diff --git a/src/bootloader.asm b/src/bootloader.asm index 06414df..7327666 100644 --- a/src/bootloader.asm +++ b/src/bootloader.asm @@ -51,5 +51,5 @@ times 510-($-$$) db 0 db 0x55, 0xaa ; magic BIOS numbers ; Bloat bytes to test reading -times 128 dw 0xe, 0xf +times 256 dw 0xe times 256 dw 0xa diff --git a/start.sh b/start.sh index 8cb51ad..a155c2a 100755 --- a/start.sh +++ b/start.sh @@ -1,2 +1,13 @@ #!/usr/bin/bash -qemu-system-x86_64 bin/bootloader.bin + +bootloader=bin/bootloader.bin + +start_bootloader() { + qemu-system-x86_64 $bootloader +} + +if test -f "$PWD/$bootloader" then + start_bootloader +else + /usr/bin/bash $PWD/compile.sh && start_bootloader +fi