| Routines

68A0: Request and set the input method (keyboard, joystick, Int2)

Used by the routine at FA49.
68A0 | LD HL,$68D4 | 68D4: 'CONTROL KEYS - Normal/Kempston/Cursor/Int2?'
68A3 | CALL $AFE8 | Print this message
68A6 | LD HL,$5C3B | This is the system variable FLAGS
68A9 | RES 5,(HL) | Signal: no key pressed yet
68AB | CALL $673D | Wait for a keypress and collect its ASCII code in A
68AE | JR Z,$68AB
68B0 | LD HL,$688C | Point HL at the keypress table for keys 0-9 when Int2 is not selected
68B3 | LD BC,$000A | There are 10 entries in this table
68B6 | CP $6E | Was 'n' pressed?
68B8 | JR Z,$68C7 | Jump if so
68BA | CP $63 | Was 'c' pressed?
68BC | JR Z,$68C7 | Jump if so
68BE | CP $6B | Was 'k' pressed?
68C0 | JR Z,$68C8 | Jump if so
68C2 | CP $69 | Was 'i' pressed?
68C4 | JR NZ,$68A6 | Jump back to collect another keypress if not
68C6 | ADD HL,BC | HL=6896 if 'i' was pressed
68C7 | XOR A | Set A to 0x00 unless 'k' was pressed
68C8 | LD DE,$6830 | Copy 10 bytes from 688C or 6896 to 6830 (the keypress table entries for keys 0-9)
68CB | LDIR
68CD | LD L,$1F | HL=681F
68CF | LD (HL),A | Store 0x6B ('k' for Kempston) or 0x00 here as appropriate
68D0 | LD HL,$5000 | Prepare HL for drawing the catwalk
68D3 | RET |