![]() |
Routines |
| Prev: 46532 | Up: Map | Next: 46591 |
|
Used by the routines at PlayMusic_WaitKey, GameOver, WaitForKeyPress, GameMenu, ReadInterface2Joystick, ReadCursorJoystick, ReadKeyboard and PauseGame.
Reads some rows of the keyboard. The row selector is also written to port 253 (with the selector as the high byte of the address), which does nothing on a 48K Spectrum and is not part of any sound; the keyboard is read with the same selector straight afterwards.
|
||||||||||||||
|
Write the selector, then read the keys.
|
||||||||||||||
| ReadKeyboardPort | 46583 | OUT (253),A | Put the half-row selector on the high byte of the address bus. | |||||||||||
| 46585 | IN A,(254) | Read the rows of the keyboard. | ||||||||||||
| 46587 | CPL | Invert the bits so that the pressed keys are set. | ||||||||||||
| 46588 | AND %00011111 | Keep only bits 0 to 4. | ||||||||||||
| 46590 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 46532 | Up: Map | Next: 46591 |