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

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