Prev: 648E Up: Map Next: 64A5
6495: Get User Input
Wait until a new key is pressed, then return that key.
Output
A The keypress value
Wait until a new key is pressed.
GetUserInput 6495 LD A,($5C3B) Read the key-state flags from FLAGS.
6498 BIT 5,A Jump back to GetUserInput until a new key is pressed.
649A JR Z,GetUserInput
649C RES 5,A Reset the new-key flag.
649E LD ($5C3B),A Write the flags back to FLAGS.
Fetch the keypress.
64A1 LD A,($5C08) Read the key from LAST_K.
64A4 RET Return.
Prev: 648E Up: Map Next: 64A5