fix cursor()
This commit is contained in:
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