From 7e0b8ad4e1ef7561734fed78eb691e39c3ff2e3b Mon Sep 17 00:00:00 2001 From: maelstrom Date: Thu, 25 Jul 2024 22:14:28 +0300 Subject: [PATCH] It's.... WORKING??!?!?!??!?!?!? YAYYYYY- --- boot.asm | 4 ++-- main.asm | 36 +++++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/boot.asm b/boot.asm index 0a2e867..171c031 100644 --- a/boot.asm +++ b/boot.asm @@ -7,7 +7,7 @@ OS_SEGMENT equ 0x100 boot: ; Load from disk mov ah, 0x02 ; read - mov al, 0x02 ; No of sectors (1) + mov al, 0x01 ; No of sectors (1) mov cl, 0x02 ; Sector start (1 = boot sector, 2 = OS) mov ch, 0x00 ; Cylinder 0 mov dh, 0x00 ; Head 0 @@ -18,7 +18,7 @@ boot: int 0x13 ; Send read interrupt jc disk_error - + ; Now that the OS is loaded in 0x1000, let's call main! jmp 0x100:0x0 diff --git a/main.asm b/main.asm index 1477f6f..50ee8f3 100644 --- a/main.asm +++ b/main.asm @@ -18,23 +18,41 @@ section KERNEL follows=BOOTSECTOR vstart=1000h %endmacro main: - call gfx_init_vga13 + ; Video mode + mov ax, 0x13 + int 0x10 + + ; Important for mouse stuff maybe???? + jmp 0x000:.setcs + .setcs: - mov di, 10 + 10 * 320 - mov si, gfxd_cursor - mov ax, 11 - mov bl, 18 - call _gfx_blit0 + call mouse_initialize + call mouse_enable + + lp: + + + cli + mov bx, [mouseX] + sti + + call print_hex + call print_nl + + jmp lp jmp $ ; Halt ; Libs %include "print_util.asm" -%include "time_util.asm" -%include "gfx_util.asm" +%include "mouse_util.asm" +;%include "time_util.asm" +;%include "gfx_util.asm" ; Data HELLO_WORLD: db 'Hello, world! :D', 0 +No: + db 'No.', 0 -%include "gfx/gfxd_cursor.asm" \ No newline at end of file +;%include "gfx/gfxd_cursor.asm" \ No newline at end of file