cc65/libsrc/telestrat/cgetc.s

29 lines
862 B
ArmAsm
Raw Normal View History

2017-10-01 23:23:03 +02:00
;
; jede jede@oric.org 2017-10-01
;
.export _cgetc
2017-10-08 18:11:09 +02:00
.import cursor
2017-10-01 23:23:03 +02:00
.include "telestrat.inc"
.proc _cgetc
2017-10-08 18:11:09 +02:00
; this routine could be quicker if we wrote in page 2 variables, but it's better to use telemon routine in that case, because telemon can manage 4 I/O
lda cursor ; if cursor equal to 0, then switch off cursor
beq switchoff_cursor
ldx #$00 ; x is the first screen
BRK_TELEMON(XCSSCR) ; display cursor
jmp loop ; could be replaced by a bne/beq but 'jmp' is cleaner than a bne/beq which could expect some
switchoff_cursor:
ldx #$00 ; x is the first screen
BRK_TELEMON(XCOSCR) ; switch off cursor
2017-10-01 23:23:03 +02:00
loop:
BRK_TELEMON XRD0
2017-10-02 12:20:52 +02:00
bcs loop
2017-10-01 23:23:03 +02:00
rts
.endproc