Well this kind of question might have already been asked, but I don't know how to formulate it so I make a new forum post (please don't blame me )
So I'm following this tutorial, I'm currently at part 3.6.4 where we are reading values from the disk.
So I compile the code using NASM 0.98.35 (I don't know if that's an old version and if I should update), using the command
Code: Select all
nasm boot_sect.asm -f bin -o boot_sect.bin
Code: Select all
qemu boot_sect.bin
Though when I create a larger disk image using these commands:
Code: Select all
dd if=/dev/zero of=floppy.img bs=1024 count=1440
dd if=boot_sect.bin of=floppy.img seek=0 count=1 conv=notrunc
The Hello, world example works so I don't know what's the cause. It feels as if the last two lines
Code: Select all
times 256 dw 0xdada
times 256 dw 0xface
Any idea what I might be doing wrong?
(I also attached my source code if you don't want to check the tutorial, or if you notice any difference I didn't, because I'm a bit blind sometimes )
EDIT: forgot to mention that I'm pretty much a beginner to OS creation, and not very advanced in ASM either
EDIT 2: well I changed my code just a little (updated the attached files too) so now hexdump says the file ends like this:
Code: Select all
0000200 dada dada dada dada dada dada dada dada
*
0000400 face face face face face face face face
*
0000600
And I also don't understand why it didn't put the dada and face bytes at the end when the only thing I removed from the code was a line containing ``HELLO_MSG: db 'Booting OS...', 0`` before the ``BOOT_DRIVE: db 0``