I've worked throught the Bram tutorial and have successfully done some tweaking here and there in the code that allowed me to stretch my legs in OS development concepts. I used GRUB for that part of my project and it worked without much effort.
Now I've "rebooted" my training path and went back to basics to deepen my understanding of the boot sequence and the goofy things that go on during the real->protected switch and other things like A20 and near/far jumping (general x86 architecture knowledge).
I've entered in the basic "do nothing" asm code:
Code: Select all
loop:
jmp loop
times 512 - ($ - $$) dd 0
dd 0x55
dd 0xAA
Code: Select all
$ nasm boot1.asm -f bin -o boot1.bin
Code: Select all
$ dd if=/dev/zero of=floppy.flp bs=512 count=2880
2880+0 records in
2880+0 records out
1474560 bytes (1.5 MB) copied, 0.027858 seconds, 52.9 MB/s
Code: Select all
$ sudo dd if=boot1.bin of=floppy.flp conv=notrunc
1+1 records in
1+1 records out
520 bytes (520 B) copied, 6.3486e-05 seconds, 8.2 MB/s
What I got was a "FATAL: No bootable device" error.
I'm not entirely sure how to read it, but hexdump gives me the following:
Code: Select all
$ hexdump boot1.bin
0000000 feeb 0000 0000 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000200 0055 0000 00aa 0000
0000208
$ hexdump floppy.flp
0000000 feeb 0000 0000 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000200 0055 0000 00aa 0000 0000 0000 0000 0000
0000210 0000 0000 0000 0000 0000 0000 0000 0000
*
0168000