2 ; Groepaz/Hitmen, 11.10.2015
8 .import soft80_internal_cellcolor, soft80_internal_cursorxlsb
16 lda KEY_COUNT ; Get number of characters
17 bne @L3 ; Jump if there are already chars waiting
20 jsr invertcursor ; set cursor on or off accordingly
22 @L1: lda KEY_COUNT ; wait for key
26 jsr invertcursor ; set cursor on or off accordingly
28 @L3: jsr KBDREAD ; Read char and return in A
32 ; Switch the cursor on or off (invert)
41 lda $01 ; enable RAM under I/O
49 ldx soft80_internal_cursorxlsb
63 ; do not use soft80_putcolor here to make sure the cursor is always
64 ; shown using the current textcolor without disturbing the "color voodoo"
71 sta (CRAM_PTR),y ; vram
75 lda (CRAM_PTR),y ; vram
77 lda soft80_internal_cellcolor
78 sta (CRAM_PTR),y ; vram
82 nibble: .byte $f0, $0f
84 ;-------------------------------------------------------------------------------
85 ; force the init constructor to be imported
88 conio_init = soft80_init