I want MINIX to first execute my code and then continue with executing default bootloader.
What I have so far is:
org 0x7c00
jmp 0:start
start:
mov ax, cs
mov ds, ax
mov es, ax
mov ss, ax
mov sp, 0x8000
; ... my code ... ;
; that is supposed to mark code as bootloader:
times 510-$+$$ db 0
dw 0xaa55
My whole code is here. I run it by executing commands:
pkgin -y in nasm
nasm -f bin my_bootloader.asm -o my_bootloader
dd bs=512 count=1 if=my_bootloader of=/dev/c0d0
reboot
After rebooting, my program starts, but of course the system doesn't load afterwards. What can I do to "attach" the original bootloader to my code?