Jump to kernel on dvd

I made a simple bootloader with nasm (that works).. my second program also compiled with nasm should be started from the bootloader... but I don't know how to do that... any ideas?

Here my websitehere. You probably see two textareas, the upper textarea is the bootloader, the second should be the second program started from the bootloader(but which I can't get it to work). Then you should push the 'make iso' button. Then in php I use the command:

$op=system("genisoimage -b prog".$getal.".img -no-emul-boot -boot-load-size 4 -o prog".$getal.".iso  /var/www/html/boot/ >> ".$getal."2.txt 2>&1 ",$back);

This makes an iso file, which burns the first program/bootloader on dvd in the bootsector(512)..this works, but now how to run the second program.

Any ideas?


Solution 1:

First, I am surprised your bootloader works at all, since it makes use of the stack (push 0a000h) without setting either the sp nor ss registers. So you're relying on the BIOS to have a stack set up somewhere which doesn't screw with the things you're trying to do. The stack might even be sitting at a very low address and overwrite the IVT or your own code – you simply cannot know.

For your original question: try looking into int 0x13. Your ISO making script could glue your two binaries together (just make sure they're appropriately padded), then from your boot code you can use the named interrupt to load your new binary into memory at a specific location and then you can far jmp there.