2 ; Ullrich von Bassewitz, 06.08.1998
15 ;--------------------------------------------------------------------------
17 _cgetc: lda KEY_COUNT ; Get number of characters
18 bne L2 ; Jump if there are already chars waiting
20 ; Switch on the cursor if needed. We MUST always switch the cursor on,
21 ; before switching it off, because switching it off will restore the
22 ; character attribute remembered when it was switched on. So just switching
23 ; it off will restore the wrong character attribute.
25 jsr CURS_SET ; Set cursor to current position
31 L1: lda KEY_COUNT ; Check characters again
33 jsr CURS_OFF ; Switch cursor off, if characters available
35 L2: jsr KBDREAD ; Read char and return in A
39 ;--------------------------------------------------------------------------
40 ; Module constructor/destructor
55 ; Set the new vector. I can only hope that this works for other C128