![]() |
Routines |
| Prev: 930C | Up: Map | Next: 9356 |
|
Return non-zero only on the call when SPACE (or SHIFT) goes down. SpaceKeyLatch latches the key as held until it is released.
|
|||||||||||||||||||||||||
|
Return non-zero when SPACE is first pressed.
|
|||||||||||||||||||||||||
| TestSpaceKey | 933E | LD A,$7E | Read from the keyboard;
|
||||||||||||||||||||||
| 9340 | OUT ($FD),A | ||||||||||||||||||||||||
| 9342 | IN A,($FE) | ||||||||||||||||||||||||
|
Test SPACE and clear the latch if it is up.
|
|||||||||||||||||||||||||
| 9344 | CPL | Flip the bits. | |||||||||||||||||||||||
| 9345 | AND %00000001 | Keep only bit 0. | |||||||||||||||||||||||
| 9347 | JR Z,TestSpaceKey_StoreLatch | If the result is zero jump to TestSpaceKey_StoreLatch. | |||||||||||||||||||||||
|
Report a new press only if the latch was not already set.
|
|||||||||||||||||||||||||
| 9349 | LD A,($5E5D) | A=*SpaceKeyLatch. | |||||||||||||||||||||||
| 934C | AND A | If A is not zero then jump to TestSpaceKey_Clear. | |||||||||||||||||||||||
| 934D | JR NZ,TestSpaceKey_Clear | ||||||||||||||||||||||||
| 934F | INC A | Increment A by one. | |||||||||||||||||||||||
| TestSpaceKey_StoreLatch | 9350 | LD ($5E5D),A | Write A to SpaceKeyLatch. | ||||||||||||||||||||||
| 9353 | RET | Return. | |||||||||||||||||||||||
| TestSpaceKey_Clear | 9354 | XOR A | A=00. | ||||||||||||||||||||||
| 9355 | RET | Return. | |||||||||||||||||||||||
| Prev: 930C | Up: Map | Next: 9356 |