From e6f439748c9a8bd815910adbf592fc7a22e02268 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 21 May 2021 10:04:36 +0200 Subject: [PATCH] Update start script --- src/bootloader.asm | 2 +- start.sh | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) 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