| ← 8D9C | Map | 8E09 → |
8DF9: Poll the quit key (Q)
|
Reads the Q key for the quit handler. That handler uses it both to raise the prompt and to wait for the key's release.
|
|||||||
|
|||||||
| poll_quit_key | 8DF9 | LD BC,KBD_ROW_Q_T | Read the Q-T keyboard half-row and keep the 5 key bits. | ||||
| 8DFC | IN A,(C) | ||||||
| 8DFE | AND $1F | ||||||
| 8E00 | BIT 0,A | Bit 0 is the Q key (0 when pressed). | |||||
| 8E02 | JR NZ,quit_key_up | Q up: return 0. | |||||
| 8E04 | LD A,$01 | Q held: report it pressed. | |||||
| 8E06 | RET | ||||||
| quit_key_up | 8E07 | XOR A | Q not held: return 0. | ||||
| 8E08 | RET | ||||||
| ← 8D9C | Map | 8E09 → |
