FAT 12 Implementation

馋奶兔 提交于 2019-12-07 07:47:26

Try a short jump: the sector begins with jmp short loader, followed by nop, then go bpbName through bsFileSystem, then loader: and all your code and then the last 2 bytes of the 512-byte sector being 0x55 and 0xAA. These two must be at offsets 510 and 511 respectively.

You're missing the 3-byte jump instruction before the BPB. The bytes-per-sector word should be at offset 0x0b relative to the beginning of the disk, not at 0x08. The jump will go to the bootloader code which is after the BPB (and if the jump is short enough that it only requires two bytes, it's followed by a nop).

If a machine will never be booted from the disk, you can put any arbitrary values in those first three bytes, but it's traditional to have a jump anyway, that goes to a piece of code that prints something like This disk is not bootable and then halts the machine.

Rika

You can find a complete implementation of a FAt12 driver in assembly here: Simple Operating System with Fat 12 Driver.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!