Prev: 38017 Up: Map Next: 38070
38025: Pause Game
Used by the routine at DrawRoom.
Called by the main loop to check for the game being paused. The game is paused when only the key for CAPS SHIFT or SPACE is pressed. It then waits until the key has been released, pressed again and released again, before returning.
PauseGame 38025 DI Disable interrupts.
38026 LD A,126 Read from the keyboard;
Port Number Bit
0 1 2 3 4
126 CAPS SHIFT / SPACE Z / SYMBOL SHIFT X / M C / N V / B
38028 OUT (253),A
38030 IN A,(254)
38032 BIT 0,A Return if the key for bit 0 is not pressed.
38034 RET NZ
38035 CPL Flip the bits, so that a set bit is a key which is pressed.
38036 AND %00011110 Keep only bits 1-4.
38038 RET NZ Return if any of the other keys are pressed.
Wait for the key to be released.
PauseGame_Release 38039 LD A,126 Read from the keyboard.
38041 OUT (253),A
38043 IN A,(254)
38045 BIT 0,A Loop back to PauseGame_Release until the key is released.
38047 JR Z,PauseGame_Release
Wait for the key to be pressed again.
PauseGame_Wait 38049 LD A,126 Read from the keyboard.
38051 OUT (253),A
38053 IN A,(254)
38055 BIT 0,A Loop back to PauseGame_Wait until the key is pressed.
38057 JR NZ,PauseGame_Wait
Wait for the key to be released again.
PauseGame_Resume 38059 LD A,126 Read from the keyboard.
38061 OUT (253),A
38063 IN A,(254)
38065 BIT 0,A Loop back to PauseGame_Resume until the key is released.
38067 JR Z,PauseGame_Resume
38069 RET Return.
Prev: 38017 Up: Map Next: 38070