Prev: 49293 Up: Map Next: 49334
49323: Read Keys
Input
A High byte of the port (zero reads every half row)
Output
A The keys that are pressed, in bits 0 to 4
F Zero flag set if no keys are pressed
ReadKeys 49323 PUSH BC Save BC.
49324 LD C,254 Set up the port.
49326 LD B,A
49327 IN A,(C) Read the keys.
49329 POP BC Restore BC.
49330 CPL Make a set bit mean that a key is pressed...
49331 AND 31 ...and keep only the bits of the five keys.
49333 RET Return.
Prev: 49293 Up: Map Next: 49334