mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-11-15 02:04:28 +00:00
23 lines
414 B
ArmAsm
23 lines
414 B
ArmAsm
.export get_key
|
|
.export check_for_abort_key
|
|
.code
|
|
;use Apple 2 monitor ROM function to read from keyboard
|
|
;inputs: none
|
|
;outputs: A contains ASCII code of key pressed
|
|
get_key:
|
|
jmp $fd1b
|
|
|
|
|
|
;check whether the escape key is being pressed
|
|
;inputs: none
|
|
;outputs: sec if escape pressed, clear otherwise
|
|
check_for_abort_key:
|
|
lda $c000 ;current key pressed
|
|
cmp #$9B
|
|
bne :+
|
|
sec
|
|
rts
|
|
:
|
|
clc
|
|
rts
|