I wanted to know the internals of the computer arch and OS. So I've been reading stuff online, books (in fact only one book modern operating systems). I came across OS dev wiki. I found the material that has been put together very useful. I decided to test few programs in the tutorials.
So I used the asm kernel code (http://wiki.osdev.org/Real_mode_assembly_bare_bones), on qemu.
assembled it using nasm
Code: Select all
nasm kernel.asm -f bin -o kernel.bin
Code: Select all
qemu -kernel kernel.bin
But when I used with out the -kernel option (qemu kernel.bin) it launched the VM with the kernel running (figure attached).
1. Can someone please tell me what could the problem be when the -kernel option is used.
At the end of the code it had the following lines:
Code: Select all
times 510-($-$$) db 0
db 0x55
db 0xAA
2. Can someone explain what exactly is happening here. Why are we using the above code when we are using the qemu built-in bootloader. And why is the code not working when I remove the signature part from the code.
Hope the question is clear.
Thanks.