simon 93219e2c87 实现线程及根据时钟中断做线程切换 10 tháng trước cách đây
..
include 604e2b192b 将内核载入内存 11 tháng trước cách đây
loader.S 93219e2c87 实现线程及根据时钟中断做线程切换 10 tháng trước cách đây
mbr.S 604e2b192b 将内核载入内存 11 tháng trước cách đây
readme.md 7b374c0814 fix: fix display bug of protection mode 11 tháng trước cách đây

readme.md

  1. boot.inc 文件放置在 include 目录下,所以编译的时候需要添加 -I 参数

       boot git:(master) ✗ nasm -I include/ -o mbr.bin mbr.asm
       boot git:(master) ✗ nasm -I include/ -o loader.bin loader.asm
    
  2. dd 命令将 mbr.bin 写入虚拟硬盘 dd if=./mbr.bin of=/此处替换成你的安装目录 /bochs/hd30M.img bs=512 count=1 conv=notrunc 回车

       (base) ➜  boot git:(master) ✗ dd if=mbr.bin of=../hd30M.img bs=512 count=1 conv=notrunc
        1+0 records in
        1+0 records out
        512 bytes transferred in 0.000350 secs (1462864 bytes/sec) 
    
  3. 将生成的 loader.bin 写入硬盘第 2 个扇区。第 0 个扇区是 MBR,第 1 个扇区是空的未使用。dd if=./loader.bin of=/此处替换成你的安装目录 /bochs/hd30M.img bs=512 count=2 seek=2 conv=notrunc 回车

        (base) ➜  boot git:(master) ✗ dd if=loader.bin of=../hd30M.img bs=512 count=1 seek=2 conv=notrunc
        0+1 records in
        0+1 records out
        103 bytes transferred in 0.000102 secs (1011741 bytes/sec)