Prev: 33971 Up: Map Next: 33996
33977: Debounce keyboard
Used by the routines at GameOver and SaveGame.
DebounceAnyKey 33977 XOR A Read from the keyboard port.
33978 IN A,(254)
33980 AND %00011111 A pressed key from any line will set its respective bit; bit 0 (outer key) to bit 4 (inner key). Hence keep only bits 0-4 for the check.
33982 CP 31 Loop back to DebounceAnyKey if a key is being pressed.
33984 JR NZ,DebounceAnyKey
NormalAnyKey 33986 XOR A Read from the keyboard port.
33987 IN A,(254)
33989 AND %00011111 A pressed key from any line will set its respective bit; bit 0 (outer key) to bit 4 (inner key). Hence keep only bits 0-4 for the check.
33991 CP 31 Loop back to NormalAnyKey until any key has been pressed.
33993 JR Z,NormalAnyKey
33995 RET Return.
Prev: 33971 Up: Map Next: 33996