.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
-; Jump table.
+; Library reference
+
+ .addr $0000
+
+; Jump table
.addr INSTALL
.addr UNINSTALL
CHIDE: jmp $0000 ; Hide the cursor
CSHOW: jmp $0000 ; Show the cursor
+CPREP: jmp $0000 ; Prepare to move the cursor
+CDRAW: jmp $0000 ; Draw the cursor
CMOVEX: jmp $0000 ; Move the cursor to X coord
CMOVEY: jmp $0000 ; Move the cursor to Y coord
Temp: .res 1
-; Default values for above variables
-
.rodata
+; Default values for above variables
+; (We use ".proc" because we want to define both a label and a scope.)
+
.proc DefVars
.word SCREEN_HEIGHT/2 ; YPos
.word SCREEN_WIDTH/2 ; XPos
; (so be careful).
;
-IRQ: lda #$7F
+IRQ: jsr CPREP
+ lda #$7F
sta CIA1_PRA
lda CIA1_PRB ; Read port #1
and #%00001100
; Move the mouse pointer to the new X pos
tya
- jmp CMOVEY
+ jsr CMOVEY
+ jsr CDRAW
+ clc ; Interrupt not "handled"
+ rts