1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-16 09:29:32 +00:00

Adding cgetc

This commit is contained in:
jede 2017-10-08 18:11:09 +02:00
parent 56360ea054
commit ff12835ee2

View File

@ -3,9 +3,24 @@
;
.export _cgetc
.import cursor
.include "telestrat.inc"
.proc _cgetc
; 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
loop:
BRK_TELEMON XRD0
bcs loop