59 lines
736 B
NASM
59 lines
736 B
NASM
; Bootloader
|
|
%include "boot.asm"
|
|
|
|
|
|
section KERNEL follows=BOOTSECTOR vstart=1000h
|
|
|
|
%macro mod 2
|
|
push ax
|
|
push cx
|
|
|
|
mov cx, %2
|
|
xor dx, dx
|
|
mov ax, %1
|
|
div cx
|
|
|
|
pop cx
|
|
pop ax
|
|
%endmacro
|
|
|
|
main:
|
|
; Video mode
|
|
mov ax, 0x13
|
|
int 0x10
|
|
|
|
; Important for mouse stuff maybe????
|
|
jmp 0x000:.setcs
|
|
.setcs:
|
|
|
|
call mouse_initialize
|
|
call mouse_enable
|
|
|
|
lp:
|
|
|
|
|
|
cli
|
|
|
|
mov bx, [mouseX]
|
|
sti
|
|
|
|
call print_sint
|
|
call print_nl
|
|
|
|
jmp lp
|
|
|
|
jmp $ ; Halt
|
|
|
|
; Libs
|
|
%include "print_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" |