![]() |
Routines |
| Prev: D0B7 | Up: Map | Next: D0E3 |
|
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 FD which has no effect on a 48K Spectrum, then read port FE.
|
||||||||||||||
| ReadKeyboardPort | D0DB | OUT ($FD),A | Write the selector to port FD. | |||||||||||
| D0DD | IN A,($FE) | Read the keyboard. | ||||||||||||
| D0DF | CPL | Make a one bit for each key which is pressed. | ||||||||||||
| D0E0 | AND %00011111 | Keep the five bits for the keys. | ||||||||||||
| D0E2 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: D0B7 | Up: Map | Next: D0E3 |