.include "mouse-kernel.inc"
.include "modload.inc"
.include "mouse-kernel.inc"
.include "modload.inc"
_mouse_unload:
lda _mouse_drv
_mouse_unload:
lda _mouse_drv
+ pha ; Save pointer to driver
ora _mouse_drv+1
beq no_driver ; No driver
ora _mouse_drv+1
beq no_driver ; No driver
- pha ; Save pointer to driver
jsr _mouse_uninstall ; Uninstall the driver
pla
tax
pla ; Get pointer to driver
jsr _mouse_uninstall ; Uninstall the driver
pla
tax
pla ; Get pointer to driver
- jmp _mod_free ; Free the driver
+ jsr _mod_free ; Free the driver
+ jmp return0 ; Return MOUSE_ERR_OK
+ pla ; Remove pushed junk
lda #<MOUSE_ERR_NO_DRIVER
rts
lda #<MOUSE_ERR_NO_DRIVER
rts