Prev: 44041 Up: Map Next: 44109
44093: WaitKeyPress — wait for any key and identify it
Rotates through the 8 keyboard half-row ports until a key is down. Returns BC = that half-row's port and A = the key's bit mask — exactly the (port, mask) pair the redefinition flow patches into KeyboardScanner.
Used by the routines at 43610 and 44815.
44093 LD BC,65278 start at half-row $FE
44096 IN A,(C)
44098 AND 31 any of its 5 keys down?
44100 XOR 31 (A = pressed bits as 1s)
44102 RET NZ yes: BC/A identify it
44103 RLC B next half-row
44105 JR C,44096
44107 JR 44093 wrapped: start over
Prev: 44041 Up: Map Next: 44109