

Determine if a key has been pressed and store this in a variable.

If no key has been pressed, the program should continue without waiting.




define sysLastKey $ff
 
main:
jsr getKeyPress
;put the rest of your program here.
jsr delay
jmp main
 
 
getKeyPress:
lda $ff
sta $00
rts
 
delay:
nop
nop
dex
bne delay
rts