diff --git a/ponydos.asm b/ponydos.asm index b69d7dc..97bd571 100644 --- a/ponydos.asm +++ b/ponydos.asm @@ -42,7 +42,7 @@ initialize_mouse: mov ax, 0xc205 mov bh, 3 ; TODO: This is the usual PS/2 mouse packet size, but is it correct here? int 0x15 - jc .error + jc initialize_mouse_error ; Set handler address ; https://www.ctyme.com/intr/rb-1603.htm @@ -50,24 +50,14 @@ initialize_mouse: ; es is already set correctly mov bx, mouse_handler int 0x15 - jc .error + jc initialize_mouse_error ; Enable mouse ; https://www.ctyme.com/intr/rb-1596.htm mov ax, 0xc200 mov bh, 1 int 0x15 - jc .error - - jmp .done - - .error: - ; https://www.ctyme.com/intr/rb-1601.htm - mov ax, 0xc201 - int 0x15 - jmp initialize_mouse - - .done: + jc initialize_mouse_error load_shell: push word 0x1000 @@ -117,6 +107,12 @@ mainloop: call flip_mouse_cursor jmp mainloop +initialize_mouse_error: + ; https://www.ctyme.com/intr/rb-1601.htm + mov ax, 0xc201 + int 0x15 + jmp initialize_mouse + ; ------------------------------------------------------------------ ; Drawing subroutines ; ------------------------------------------------------------------