Prev: 687F Up: Map Next: 6892
6884: Wait For Key Down
Used by the routines at PlotCharacter, OfferAnotherGame and RestoreGame.
Spins while the second key slot of KSTATE is FF, which is the value it holds when nothing is pressed.
Output
A The key state.
WaitKeyDown 6884 PUSH HL Save the registers around the wait.
6885 PUSH BC
6886 PUSH DE
WaitKeyDown_Spin 6887 LD A,($5C04) Spin while the second key slot of KSTATE is FF.
688A CP $FF
688C JR Z,WaitKeyDown_Spin
688E POP DE Restore the registers from the stack.
688F POP BC
6890 POP HL
6891 RET Return.
Prev: 687F Up: Map Next: 6892