![]() |
Routines |
| Prev: 33971 | Up: Map | Next: 33996 |
|
Used by the routines at PercentageAscii and SaveGame.
Waits until the current key has been released.
|
||||
| DebounceAnyKey | 33977 | XOR A | Read from the keyboard port. | |
| 33978 | IN A,(254) | |||
| 33980 | AND %00011111 | Keep bits 0-4, one for each key in the half-row. XOR A then IN A,(254) reads every half-row at once, and a pressed key reads as a reset bit. | ||
| 33982 | CP 31 | Loop back to DebounceAnyKey if a key is being pressed. | ||
| 33984 | JR NZ,DebounceAnyKey | |||
| Normal_AnyKey | 33986 | XOR A | Read from the keyboard port. | |
| 33987 | IN A,(254) | |||
| 33989 | AND %00011111 | Keep bits 0-4, one for each key in the half-row. XOR A then IN A,(254) reads every half-row at once, and a pressed key reads as a reset bit. | ||
| 33991 | CP 31 | Loop back to Normal_AnyKey until any key has been pressed. | ||
| 33993 | JR Z,Normal_AnyKey | |||
| 33995 | RET | Return. | ||
| Prev: 33971 | Up: Map | Next: 33996 |