4cade/src/wait.a

22 lines
432 B
Plaintext
Raw Normal View History

2018-12-29 18:38:18 +00:00
;license:MIT
;(c) 2018-9 by 4am
2018-12-29 18:38:18 +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
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