2 ; Ullrich von Bassewitz, 06.08.1998
13 .include "cbm_kernal.inc"
16 ;--------------------------------------------------------------------------
18 _cgetc: lda KEY_COUNT ; Get number of characters
19 bne L2 ; Jump if there are already chars waiting
21 ; Switch on the cursor if needed. We MUST always switch the cursor on,
22 ; before switching it off, because switching it off will restore the
23 ; character attribute remembered when it was switched on. So just switching
24 ; it off will restore the wrong character attribute.
26 jsr CURS_SET ; Set cursor to current position
32 L1: lda KEY_COUNT ; Check characters again
34 jsr CURS_OFF ; Switch cursor off, if characters available
36 L2: jsr KBDREAD ; Read char and return in A
40 ;--------------------------------------------------------------------------
41 ; Module constructor/destructor
56 ; Set the new vector. I can only hope that this works for other C128