; be called from an interrupt handler
;
- .ifdef __APPLE2ENH__
- .constructor initmcb
- .endif
.export _mouse_def_callbacks
.include "apple2.inc"
.addr movex
.addr movey
-; ------------------------------------------------------------------------
-
- .segment "INIT"
-
- .ifdef __APPLE2ENH__
-initmcb:
- lda ALTCHARSET ; Alternate charset switched in?
- bpl :+ ; No, normal charset
- lda #'B' ; MouseText character
- sta cmpcur+1
- sta getcur+1
-: rts
- .endif
-
; ------------------------------------------------------------------------
.data
+ .ifdef __APPLE2ENH__
+cursor = 'B' ; MouseText character
+ .else
+cursor = '+' | $40 ; Flashing crosshair
+ .endif
+
getcursor:
.ifdef __APPLE2ENH__
bit RD80VID ; In 80 column mode?
.endif
column: ldx #$00 ; Patched at runtime
getscr: lda $0400,x ; Patched at runtime
-cmpcur: cmp #'+' | $40 ; Possibly patched by initialization
+ cmp #cursor
rts
setcursor:
-getcur: lda #'+' | $40 ; Possibly patched by initialization
+ lda #cursor
setscr: sta $0400,x ; Patched at runtime
.ifdef __APPLE2ENH__
bit LOWSCR ; Doesn't hurt in 40 column mode