Get rid of one (1) jump
This commit is contained in:
parent
e900a60d4a
commit
8178c7a715
22
ponydos.asm
22
ponydos.asm
|
@ -42,7 +42,7 @@ initialize_mouse:
|
||||||
mov ax, 0xc205
|
mov ax, 0xc205
|
||||||
mov bh, 3 ; TODO: This is the usual PS/2 mouse packet size, but is it correct here?
|
mov bh, 3 ; TODO: This is the usual PS/2 mouse packet size, but is it correct here?
|
||||||
int 0x15
|
int 0x15
|
||||||
jc .error
|
jc initialize_mouse_error
|
||||||
|
|
||||||
; Set handler address
|
; Set handler address
|
||||||
; https://www.ctyme.com/intr/rb-1603.htm
|
; https://www.ctyme.com/intr/rb-1603.htm
|
||||||
|
@ -50,24 +50,14 @@ initialize_mouse:
|
||||||
; es is already set correctly
|
; es is already set correctly
|
||||||
mov bx, mouse_handler
|
mov bx, mouse_handler
|
||||||
int 0x15
|
int 0x15
|
||||||
jc .error
|
jc initialize_mouse_error
|
||||||
|
|
||||||
; Enable mouse
|
; Enable mouse
|
||||||
; https://www.ctyme.com/intr/rb-1596.htm
|
; https://www.ctyme.com/intr/rb-1596.htm
|
||||||
mov ax, 0xc200
|
mov ax, 0xc200
|
||||||
mov bh, 1
|
mov bh, 1
|
||||||
int 0x15
|
int 0x15
|
||||||
jc .error
|
jc initialize_mouse_error
|
||||||
|
|
||||||
jmp .done
|
|
||||||
|
|
||||||
.error:
|
|
||||||
; https://www.ctyme.com/intr/rb-1601.htm
|
|
||||||
mov ax, 0xc201
|
|
||||||
int 0x15
|
|
||||||
jmp initialize_mouse
|
|
||||||
|
|
||||||
.done:
|
|
||||||
|
|
||||||
load_shell:
|
load_shell:
|
||||||
push word 0x1000
|
push word 0x1000
|
||||||
|
@ -117,6 +107,12 @@ mainloop:
|
||||||
call flip_mouse_cursor
|
call flip_mouse_cursor
|
||||||
jmp mainloop
|
jmp mainloop
|
||||||
|
|
||||||
|
initialize_mouse_error:
|
||||||
|
; https://www.ctyme.com/intr/rb-1601.htm
|
||||||
|
mov ax, 0xc201
|
||||||
|
int 0x15
|
||||||
|
jmp initialize_mouse
|
||||||
|
|
||||||
; ------------------------------------------------------------------
|
; ------------------------------------------------------------------
|
||||||
; Drawing subroutines
|
; Drawing subroutines
|
||||||
; ------------------------------------------------------------------
|
; ------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue