2 ; Groepaz/Hitmen, 19.10.2015
4 ; high level implementation for the monochrome soft80 implementation
9 .export soft80mono_cgetc
10 .import soft80mono_internal_cellcolor, soft80mono_internal_cursorxlsb
11 .import soft80mono_internal_nibble
15 .include "cbm_kernal.inc"
20 lda KEY_COUNT ; Get number of characters
21 bne @L3 ; Jump if there are already chars waiting
23 jsr invertcursor ; set cursor on or off accordingly
25 @L1: lda KEY_COUNT ; wait for key
28 jsr invertcursor ; set cursor on or off accordingly
30 @L3: jsr KBDREAD ; Read char and return in A
34 ; Switch the cursor on or off (invert)
43 lda $01 ; enable RAM under I/O
49 ldx soft80mono_internal_cursorxlsb
52 eor soft80mono_internal_nibble,x
63 ;-------------------------------------------------------------------------------
64 ; force the init constructor to be imported
66 .import soft80mono_init
67 conio_init = soft80mono_init