7 .import soft80_putcolor
13 lda KEY_COUNT ; Get number of characters
14 bne L3 ; Jump if there are already chars waiting
16 ; Switch on the cursor if needed
19 jsr setcursor ; set cursor on or off accordingly
21 L1: lda KEY_COUNT ; wait for key
31 L3: jsr KBDREAD ; Read char and return in A
35 ; Switch the cursor on or off