2 ; Ullrich von Bassewitz, 06.08.1998
10 .include "cbm_kernal.inc"
14 ; --------------------------------------------------------------------------
16 _cgetc: lda KEY_COUNT ; Get number of characters
17 ora FKEY_COUNT ; Or with number of function key chars
18 bne L2 ; Jump if there are already chars waiting
20 ; Switch on the cursor if needed
23 lda (CRAM_PTR),y ; Get current char
29 beq L1 ; Jump if no cursor
36 sbc #$0B ; + carry = $C00 (screen address)
45 sta TED_CURSLO ; Cursor off
48 L2: jsr KBDREAD ; Read char and return in A
52 ; --------------------------------------------------------------------------
53 ; Make the function keys return function key codes instead of the current
54 ; strings so the program will see and may handle them.
55 ; Undo this change when the program ends
67 lda #$01 ; Lower 8 places are all $01
75 fnkeys: .byte 133, 137, 134, 138, 135, 139, 136, 140
82 ldx #$39 ; Copy the original function keys