mirror of
https://github.com/a2-4am/4sports.git
synced 2024-09-27 12:55:21 +00:00
22 lines
432 B
Plaintext
22 lines
432 B
Plaintext
|
;license:MIT
|
||
|
;(c) 2018-9 by 4am
|
||
|
;
|
||
|
|
||
|
; This file is included from multiple assembly targets,
|
||
|
; so it should only have 1 function.
|
||
|
|
||
|
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
|