2 ; Ullrich von Bassewitz, 06.08.1998
13 ; --------------------------------------------------------------------------
15 _cgetc: lda KEY_COUNT ; Get number of characters
16 ora FKEY_COUNT ; Or with number of function key chars
17 bne L2 ; Jump if there are already chars waiting
19 ; Switch on the cursor if needed
22 lda (CRAM_PTR),y ; Get current char
28 beq L1 ; Jump if no cursor
35 sbc #$0B ; + carry = $C00 (screen address)
44 sta TED_CURSLO ; Cursor off
47 L2: jsr KBDREAD ; Read char and return in A
51 ; --------------------------------------------------------------------------
52 ; Make the function keys return function key codes instead of the current
53 ; strings so the program will see and may handle them.
54 ; Undo this change when the program ends
73 ldx #$39 ; Copy the original function keys
83 ; Function key table, readonly
86 fnkeys: .byte $01, $01, $01, $01, $01, $01, $01, $01
87 .byte 133, 137, 134, 138, 135, 139, 136, 140