; need to do that here, because our mouse interrupt handler doesn't set the
; mouse position if it hasn't changed.
+ php
sei
jsr CHIDE
lda XPos
lda YPos
ldx YPos+1
jsr CMOVEY
- cli
+ plp
; Done, return zero (= MOUSE_ERR_OK)
; No return code required.
HIDE: dec visible
+ php
sei
jsr CHIDE
- cli
+ plp
rts
;----------------------------------------------------------------------------
; No return code required.
SHOW: inc visible
+ php
sei
jsr CSHOW
- cli
+ plp
rts
;----------------------------------------------------------------------------
stx ptr1+1 ; Save data pointer
ldy #.sizeof (MOUSE_BOX)-1
+ php
sei
@L1: lda (ptr1),y
dey
bpl @L1
- cli
+ plp
rts
;----------------------------------------------------------------------------
stx ptr1+1 ; Save data pointer
ldy #.sizeof (MOUSE_BOX)-1
+ php
sei
@L1: lda XMin,y
dey
bpl @L1
- cli
+ plp
rts
;----------------------------------------------------------------------------
; the screen). No return code required.
;
-MOVE: sei ; No interrupts
+MOVE: php
+ sei ; No interrupts
pha
txa
jsr CSHOW
-@Ret: cli ; Allow interrupts
+@Ret: plp ; Restore interrupt flag
rts
;----------------------------------------------------------------------------
POS: ldy #MOUSE_POS::XCOORD ; Structure offset
+ php
sei ; Disable interrupts
lda XPos ; Transfer the position
sta (ptr1),y
iny
sta (ptr1),y
lda YPos+1
- cli ; Enable interrupts
+ plp ; Restore interrupt flag
iny
sta (ptr1),y ; Store last byte