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
19 lda KEY_COUNT ; Get number of characters
20 bne @L3 ; Jump if there are already chars waiting
22 jsr invertcursor ; set cursor on or off accordingly
24 @L1: lda KEY_COUNT ; wait for key
27 jsr invertcursor ; set cursor on or off accordingly
29 @L3: jsr KBDREAD ; Read char and return in A
33 ; Switch the cursor on or off (invert)
42 lda $01 ; enable RAM under I/O
48 ldx soft80mono_internal_cursorxlsb
51 eor soft80mono_internal_nibble,x
62 ;-------------------------------------------------------------------------------
63 ; force the init constructor to be imported
65 .import soft80mono_init
66 conio_init = soft80mono_init