![]() |
Routines |
| Prev: 53431 | Up: Map | Next: 53475 |
|
Used by the routines at HandleMenuKeys, PlayMusicOnce, ReadInterface2Joystick, ReadCursorJoystick, ReadKeyboard, ReadControls_Rotate and PauseGame.
Reads the keyboard half-rows selected by A. A zero bit selects a half-row, and more than one half-row can be read at once. The keys that are pressed come back as set bits 0 to 4.
|
||||||||||||||
|
Write the selector to port 253 which has no effect on a 48K Spectrum, then read port 254.
|
||||||||||||||
| ReadKeyboardPort | 53467 | OUT (253),A | Write the selector to port 253. | |||||||||||
| 53469 | IN A,(254) | Read the keyboard. | ||||||||||||
| 53471 | CPL | Make a one bit for each key which is pressed. | ||||||||||||
| 53472 | AND %00011111 | Keep the five bits for the keys. | ||||||||||||
| 53474 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 53431 | Up: Map | Next: 53475 |