![]() |
Routines |
| Prev: 84B3 | Up: Map | Next: 84CC |
|
Used by the routines at PercentageAscii and SaveGame.
Waits until the current key has been released.
|
||||
| DebounceAnyKey | 84B9 | XOR A | Read from the keyboard port. | |
| 84BA | IN A,($FE) | |||
| 84BC | AND %00011111 | Keep bits 0-4, one for each key in the half-row. XOR A then IN A,(FE) reads every half-row at once, and a pressed key reads as a reset bit. | ||
| 84BE | CP $1F | Loop back to DebounceAnyKey if a key is being pressed. | ||
| 84C0 | JR NZ,DebounceAnyKey | |||
| Normal_AnyKey | 84C2 | XOR A | Read from the keyboard port. | |
| 84C3 | IN A,($FE) | |||
| 84C5 | AND %00011111 | Keep bits 0-4, one for each key in the half-row. XOR A then IN A,(FE) reads every half-row at once, and a pressed key reads as a reset bit. | ||
| 84C7 | CP $1F | Loop back to Normal_AnyKey until any key has been pressed. | ||
| 84C9 | JR Z,Normal_AnyKey | |||
| 84CB | RET | Return. | ||
| Prev: 84B3 | Up: Map | Next: 84CC |