mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-03 18:29:53 +00:00
15 lines
370 B
ArmAsm
15 lines
370 B
ArmAsm
WaitForKeyWithTimeout:
|
|
; in: A = timeout length (like standard $FCA8 wait routine)
|
|
; out: A clobbered (not always 0 if key is pressed, but also not the key pressed)
|
|
; X/Y preserved
|
|
sec
|
|
wait1: pha
|
|
wait2: sbc #1
|
|
bne wait2
|
|
pla
|
|
bit KBD
|
|
bmi wfk_exit
|
|
sbc #1
|
|
bne wait1
|
|
wfk_exit: rts
|