fix cursor()
This commit is contained in:
@@ -63,16 +63,24 @@
|
|||||||
MOUSE_GET := $FF6B
|
MOUSE_GET := $FF6B
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if .def(__C65__) || .def (__MEGA65__)
|
.if .def (__MEGA65__)
|
||||||
; extended C65 jump table
|
; extended C65 jump table
|
||||||
VERSIONQ := $FF2F
|
|
||||||
RESET_RUN := $FF32
|
; memory before $ff3b is all $ff in mega65 ROM?
|
||||||
CURSOR := $FF35
|
; VERSIONQ := $FF2F
|
||||||
|
; RESET_RUN := $FF32
|
||||||
|
; CURSOR := $FF35
|
||||||
|
|
||||||
SAVEFL := $FF3B
|
SAVEFL := $FF3B
|
||||||
GETIO := $FF41
|
GETIO := $FF41
|
||||||
GETLFS := $FF44
|
GETLFS := $FF44
|
||||||
KEYLOCKS := $FF47
|
KEYLOCKS := $FF47
|
||||||
ADDKEY := $FF4A
|
ADDKEY := $FF4A
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if .def(__C65__) || .def (__MEGA65__)
|
||||||
|
CURSOR := $E030 ; in editor ROM
|
||||||
|
|
||||||
SPIN_SPOUT := $FF4D
|
SPIN_SPOUT := $FF4D
|
||||||
CLSALL := $FF50
|
CLSALL := $FF50
|
||||||
C64MODE := $FF53
|
C64MODE := $FF53
|
||||||
|
|||||||
26
libsrc/c65/cursor.s
Normal file
26
libsrc/c65/cursor.s
Normal 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
26
libsrc/mega65/cursor.s
Normal 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user