mirror of
https://github.com/cc65/cc65.git
synced 2025-08-13 08:25:28 +00:00
Honor the new MOUSE_FLAG_EARLY_IRQ and MOUSE_FLAG_LATE_IRQ flags also when
uninstalling the driver. git-svn-id: svn://svn.cc65.org/cc65/trunk@3761 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -159,8 +159,20 @@ copycb: lda (sreg),y
|
|||||||
; /* Uninstall the currently loaded driver. Returns an error code. */
|
; /* Uninstall the currently loaded driver. Returns an error code. */
|
||||||
|
|
||||||
_mouse_uninstall:
|
_mouse_uninstall:
|
||||||
|
|
||||||
|
; Depending on the late/early IRQ flag, we will disable IRQs before or after
|
||||||
|
; calling the driver mouse_uninstall routine.
|
||||||
|
|
||||||
|
bit mouse_flags ; Test MOUSE_FLAG_LATE_IRQ
|
||||||
|
bpl @L1 ; Don't disable interrupts now
|
||||||
jsr uninstall_irq ; Disable driver interrupts
|
jsr uninstall_irq ; Disable driver interrupts
|
||||||
jsr mouse_uninstall ; Call driver routine
|
@L1: jsr mouse_uninstall ; Call driver routine
|
||||||
|
|
||||||
|
; We don't check the flag a second time here, since disabling IRQs twice,
|
||||||
|
; or disabling them if they weren't enabled will do no harm, and the missing
|
||||||
|
; check will save a few bytes.
|
||||||
|
|
||||||
|
jsr uninstall_irq ; Disable driver interrupts
|
||||||
|
|
||||||
_mouse_clear_ptr: ; External entry point
|
_mouse_clear_ptr: ; External entry point
|
||||||
lda #0
|
lda #0
|
||||||
@@ -170,4 +182,4 @@ _mouse_clear_ptr: ; External entry point
|
|||||||
tax
|
tax
|
||||||
rts ; Return zero
|
rts ; Return zero
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user