fix cursor()

This commit is contained in:
mrdudz
2025-06-25 20:38:58 +02:00
parent 2206b8d199
commit ef1b101538
3 changed files with 64 additions and 4 deletions

View File

@@ -63,16 +63,24 @@
MOUSE_GET := $FF6B
.endif
.if .def(__C65__) || .def (__MEGA65__)
.if .def (__MEGA65__)
; extended C65 jump table
VERSIONQ := $FF2F
RESET_RUN := $FF32
CURSOR := $FF35
; memory before $ff3b is all $ff in mega65 ROM?
; VERSIONQ := $FF2F
; RESET_RUN := $FF32
; CURSOR := $FF35
SAVEFL := $FF3B
GETIO := $FF41
GETLFS := $FF44
KEYLOCKS := $FF47
ADDKEY := $FF4A
.endif
.if .def(__C65__) || .def (__MEGA65__)
CURSOR := $E030 ; in editor ROM
SPIN_SPOUT := $FF4D
CLSALL := $FF50
C64MODE := $FF53

26
libsrc/c65/cursor.s Normal file
View File

@@ -0,0 +1,26 @@
;
; unsigned char cursor (unsigned char onoff);
;
.include "cbm_kernal.inc"
.export _cursor
.import cursor
.proc _cursor
pha
; A != 0 to enable, 0 to disable
cmp #0
beq disable ; C = 1
clc
disable:
; C = 0 to enable, 1 to disable
jsr CURSOR
ply ; onoff into Y
ldx #0 ; High byte of result
lda cursor ; Get old value
sty cursor ; Set new value
rts
.endproc

26
libsrc/mega65/cursor.s Normal file
View File

@@ -0,0 +1,26 @@
;
; unsigned char cursor (unsigned char onoff);
;
.include "cbm_kernal.inc"
.export _cursor
.import cursor
.proc _cursor
pha
; A != 0 to enable, 0 to disable
cmp #0
beq disable ; C = 1
clc
disable:
; C = 0 to enable, 1 to disable
jsr CURSOR
ply ; onoff into Y
ldx #0 ; High byte of result
lda cursor ; Get old value
sty cursor ; Set new value
rts
.endproc