It's.... WORKING??!?!?!??!?!?!? YAYYYYY-

This commit is contained in:
maelstrom 2024-07-25 22:14:28 +03:00
parent 3b469f2869
commit 7e0b8ad4e1
2 changed files with 29 additions and 11 deletions

View file

@ -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

View file

@ -18,23 +18,41 @@ section KERNEL follows=BOOTSECTOR vstart=1000h
%endmacro
main:
call gfx_init_vga13
; Video mode
mov ax, 0x13
int 0x10
mov di, 10 + 10 * 320
mov si, gfxd_cursor
mov ax, 11
mov bl, 18
call _gfx_blit0
; Important for mouse stuff maybe????
jmp 0x000:.setcs
.setcs:
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"
;%include "gfx/gfxd_cursor.asm"