From e4c3f4af3af41e8dc42f38098be78724938e4781 Mon Sep 17 00:00:00 2001 From: maelstrom Date: Wed, 24 Jul 2024 20:02:54 +0300 Subject: [PATCH] Incomplete demo --- boot.asm | 17 +++++++++++++++++ main.asm | 38 ++++++++++---------------------------- main.bin | Bin 512 -> 531 bytes print_util.asm | 19 ++++++++++++++++++- 4 files changed, 45 insertions(+), 29 deletions(-) create mode 100644 boot.asm diff --git a/boot.asm b/boot.asm new file mode 100644 index 0000000..beb1127 --- /dev/null +++ b/boot.asm @@ -0,0 +1,17 @@ +[org 0x7c00] + +boot: + mov bx, HELLO_WORLD2 + call println + +jmp $ ; Halt + +; Boot sector libs + + +; Boot sector data + + +; Boot sector padding and magic number +times 510-($-$$) db 0 +dw 0xaa55 diff --git a/main.asm b/main.asm index 6ccdf92..188af92 100644 --- a/main.asm +++ b/main.asm @@ -1,33 +1,15 @@ -[org 0x7c00] +; Bootloader +%include "boot.asm" main: - ; Video mode - mov ax, 0x13 - int 0x10 + mov bx, HELLO_WORLD + call println - call mouse_initialize - call mouse_enable - -lp: - cli - mov bx, [mouseX] - call print_hex - mov bx, [mouseY] - sti - - jmp lp - jmp $ ; Halt - -; Make sure includes are done last, otherwise the first include will become main + +; Libs %include "print_util.asm" -;%include "input_util.asm" -;%include "num_util.asm" -%include "mouse_util.asm" - -; Make sure data is *inside* the boot sector, or it will not be copied to the right place -; in memory. - - -times 510-($-$$) db 0 -dw 0xaa55 + +; Data +HELLO_WORLD: + db 'Hello, world! :D', 0 \ No newline at end of file diff --git a/main.bin b/main.bin index 41d33889810600b2dcee5f6e5e363e4693eb12b3..7ca3f4e48733e6920afbdbc759f4176fa2fa196f 100644 GIT binary patch delta 65 zcmZo*naskrdsfX0MTUt|Qv^Ixb8_-^6w339a#9o(tXw7sGOnGRz&H8%JFD^3t>Xvh#+`)Qi zJM&r5B8eT$5C%UV`)=pj9qfmIg3Lc&GyaTbKg<^VLWBV*&H)kM!Ek6h<5^L#1dwfb z`>bf+VXzLMP-y2