2 ; Groepaz/Hitmen, 11.10.2015
4 ; high level implementation for the soft80 implementation
10 .import soft80_internal_cellcolor, soft80_internal_cursorxlsb
14 .include "cbm_kernal.inc"
19 lda KEY_COUNT ; Get number of characters
20 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
29 jsr invertcursor ; set cursor on or off accordingly
31 @L3: jsr KBDREAD ; Read char and return in A
35 ; Switch the cursor on or off (invert)
44 lda $01 ; enable RAM under I/O
52 ldx soft80_internal_cursorxlsb
66 ; do not use soft80_putcolor here to make sure the cursor is always
67 ; shown using the current textcolor without disturbing the "color voodoo"
74 sta (CRAM_PTR),y ; vram
78 lda (CRAM_PTR),y ; vram
80 lda soft80_internal_cellcolor
81 sta (CRAM_PTR),y ; vram
85 nibble: .byte $f0, $0f
87 ;-------------------------------------------------------------------------------
88 ; force the init constructor to be imported
91 conio_init = soft80_init