Prev: 26751 Up: Map Next: 26770
26756: Wait For Key Down
Used by the routines at PlotCharacter, OfferAnotherGame and RestoreGame.
Spins while the second key slot of KSTATE is 255, which is the value it holds when nothing is pressed.
Output
A The key state.
WaitKeyDown 26756 PUSH HL Save the registers around the wait.
26757 PUSH BC
26758 PUSH DE
WaitKeyDown_Spin 26759 LD A,(23556) Spin while the second key slot of KSTATE is 255.
26762 CP 255
26764 JR Z,WaitKeyDown_Spin
26766 POP DE Restore the registers from the stack.
26767 POP BC
26768 POP HL
26769 RET Return.
Prev: 26751 Up: Map Next: 26770