Prev: BA87 Up: Map Next: BA9E
BA9B: Wait a while or until a key is pressed
Used by the routines at await_restart and game_complete_msg.
Polls all eight half-rows through read_port until one shows a key or the count runs out. Each poll costs about 95 T-states, so B=8 -- what both callers pass -- is roughly 14 seconds.
Input
B how long: B times 65536 polls of the keyboard
wait_for_key_press BA9B LD HL,$0000 HL counts 65536 polls before B is decremented
Prev: BA87 Up: Map Next: BA9E