2 ; Ullrich von Bassewitz, 06.08.1998
8 .import plot, write_crtc
14 _cgetc: lda KeyIndex ; Get number of characters
15 bne L2 ; Jump if there are already chars waiting
17 ; Switch on the cursor if needed
20 beq L1 ; Jump if no cursor
22 jsr plot ; Set the current cursor position
24 lda Config ; Cursor format
25 jsr write_crtc ; Set the cursor formar
34 L2: ldx #$00 ; Get index
35 ldy KeyBuf ; Get first character in the buffer
37 L3: lda KeyBuf+1,x ; Move up the remaining chars
46 tya ; First char from buffer