bootloader
所属分类:单片机开发
开发工具:Assembly
文件大小:0KB
下载次数:0
上传日期:2024-03-01 23:43:21
上 传 者:
sh-1993
说明: 创建自己的引导扇区。探索在没有任何操作系统支持的情况下,在实模式下编程的感觉。事实上,开始编写自己的操作系统。请参阅https:www.staerk.de thorsten assembler_tutorial
(Create your own bootsector. Explore how programming in real mode feels, without any support of the operating system. In fact, start writing your own operating system. See https: www.staerk.de thorsten assembler_tutorial)
文件列表:
hello.s
# bootloader
Create your own bootsector. Explore how programming in real mode feels, without any support of the operating system. In fact, start writing your own operating system. See https://www.staerk.de/thorsten/assembler_tutorial
# compiling
In this example I use Ubuntu Linux 22.04.
Compile your bootsector with the command
```
nasm -f bin hello.s
```
Create your virtual 1MB bootdisk with the command
```
dd if=/dev/zero of=bootdisk.img seek=2K count=1
```
Put your bootsector at the beginning of your virtual bootdisk with the command
```
dd if=hello of=bootdisk.img conv=notrunc
```
Manipulate your bootloader, put the magic bytes 55AA at the end. If you do not know how, watch https://www.youtube.com/watch?v=3C3u0eUPxZI
Boot your virtual machine using the command
```
qemu-system-i386 -fda bootdisk.img
```
近期下载者:
相关文件:
收藏者: