It's.... WORKING??!?!?!??!?!?!? YAYYYYY-
This commit is contained in:
parent
3b469f2869
commit
7e0b8ad4e1
2
boot.asm
2
boot.asm
|
@ -7,7 +7,7 @@ OS_SEGMENT equ 0x100
|
||||||
boot:
|
boot:
|
||||||
; Load from disk
|
; Load from disk
|
||||||
mov ah, 0x02 ; read
|
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 cl, 0x02 ; Sector start (1 = boot sector, 2 = OS)
|
||||||
mov ch, 0x00 ; Cylinder 0
|
mov ch, 0x00 ; Cylinder 0
|
||||||
mov dh, 0x00 ; Head 0
|
mov dh, 0x00 ; Head 0
|
||||||
|
|
36
main.asm
36
main.asm
|
@ -18,23 +18,41 @@ section KERNEL follows=BOOTSECTOR vstart=1000h
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
main:
|
main:
|
||||||
call gfx_init_vga13
|
; Video mode
|
||||||
|
mov ax, 0x13
|
||||||
|
int 0x10
|
||||||
|
|
||||||
mov di, 10 + 10 * 320
|
; Important for mouse stuff maybe????
|
||||||
mov si, gfxd_cursor
|
jmp 0x000:.setcs
|
||||||
mov ax, 11
|
.setcs:
|
||||||
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
|
jmp $ ; Halt
|
||||||
|
|
||||||
; Libs
|
; Libs
|
||||||
%include "print_util.asm"
|
%include "print_util.asm"
|
||||||
%include "time_util.asm"
|
%include "mouse_util.asm"
|
||||||
%include "gfx_util.asm"
|
;%include "time_util.asm"
|
||||||
|
;%include "gfx_util.asm"
|
||||||
|
|
||||||
; Data
|
; Data
|
||||||
HELLO_WORLD:
|
HELLO_WORLD:
|
||||||
db 'Hello, world! :D', 0
|
db 'Hello, world! :D', 0
|
||||||
|
No:
|
||||||
|
db 'No.', 0
|
||||||
|
|
||||||
%include "gfx/gfxd_cursor.asm"
|
;%include "gfx/gfxd_cursor.asm"
|
Loading…
Reference in a new issue