2018-12-29 18:38:18 +00:00
|
|
|
;license:MIT
|
2019-06-24 02:32:18 +00:00
|
|
|
;(c) 2018-9 by 4am
|
2018-12-29 18:38:18 +00:00
|
|
|
;
|
|
|
|
|
2018-10-29 23:23:43 +00:00
|
|
|
; This file is included from multiple assembly targets,
|
|
|
|
; so it should only have 1 function.
|
2018-12-29 18:38:18 +00:00
|
|
|
|
2018-10-29 23:23:43 +00:00
|
|
|
WaitForKeyWithTimeout
|
|
|
|
; in: A = timeout length (like standard $FCA8 wait routine)
|
|
|
|
; out: A clobbered
|
|
|
|
; X/Y preserved
|
|
|
|
sec
|
|
|
|
@wait1 pha
|
|
|
|
@wait2 sbc #1
|
|
|
|
bne @wait2
|
|
|
|
pla
|
|
|
|
bit $C000
|
|
|
|
bmi @exit
|
|
|
|
sbc #1
|
|
|
|
bne @wait1
|
|
|
|
@exit rts
|