Quote
GETIN = $FFE4 ; get character from keyboard
BASIN = $FFCF ; get character
BSOUT = $FFD2 ; write character
.import prhex_byte
.segment "INIT"
.segment "ONCE"
.segment "STARTUP"
start:
JSR GETIN
CMP #0 ; no key pressed
BEQ start
CMP #4 ; Ctrl+D EOT XXX: this doesn't work
BEQ done
JSR prhex_byte
LDA #32
JSR BSOUT
BRA start
done:
RTS
I am trying to get a simple REPL going: Read the keyboard, do something with the key, print the result.
I have never owned a Commodore machine (I grew up on Apple ][e, but the first computer I owned was a PC: a 486DX2 with a gigantic 243MB hard disk) so I have a big learning curve.
This code "works", but the emulator intercepts a lot of the keystrokes. I also noticed that GETIN definitely doesn't return ASCII.
How do I turn on/off the emulator's preprocessing of the control keys?
Where can I get a list of the scan-codes that GETIN returns?