mirror of
https://github.com/cc65/cc65.git
synced 2024-11-05 08:05:51 +00:00
mouse_unload didn't return a valid erro code on success.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3753 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
878dcf4aa7
commit
4e599d372f
@ -8,26 +8,29 @@
|
|||||||
.include "mouse-kernel.inc"
|
.include "mouse-kernel.inc"
|
||||||
.include "modload.inc"
|
.include "modload.inc"
|
||||||
|
|
||||||
|
.import return0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_mouse_unload:
|
_mouse_unload:
|
||||||
lda _mouse_drv
|
lda _mouse_drv
|
||||||
|
pha ; Save pointer to driver
|
||||||
ora _mouse_drv+1
|
ora _mouse_drv+1
|
||||||
beq no_driver ; No driver
|
beq no_driver ; No driver
|
||||||
|
|
||||||
lda _mouse_drv
|
|
||||||
pha
|
|
||||||
lda _mouse_drv+1
|
lda _mouse_drv+1
|
||||||
pha ; Save pointer to driver
|
pha
|
||||||
|
|
||||||
jsr _mouse_uninstall ; Uninstall the driver
|
jsr _mouse_uninstall ; Uninstall the driver
|
||||||
|
|
||||||
pla
|
pla
|
||||||
tax
|
tax
|
||||||
pla ; Get pointer to driver
|
pla ; Get pointer to driver
|
||||||
jmp _mod_free ; Free the driver
|
jsr _mod_free ; Free the driver
|
||||||
|
jmp return0 ; Return MOUSE_ERR_OK
|
||||||
|
|
||||||
no_driver:
|
no_driver:
|
||||||
tax ; X = 0
|
tax ; X = 0
|
||||||
|
pla ; Remove pushed junk
|
||||||
lda #<MOUSE_ERR_NO_DRIVER
|
lda #<MOUSE_ERR_NO_DRIVER
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user