![]() |
Routines |
| Prev: B74D | Up: Map | Next: B761 |
|
Used by the routines at HandleAttackingTool, PlayMusic_WaitKey, GameOver, WaitForKeyPress, GameMenu, ReadInterface2Joystick, ReadCursorJoystick, ReadKeyboard and PauseGame.
Reads some rows of the keyboard. The row selector is also written to port FD (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 | B759 | OUT ($FD),A | Write the row selector to port FD. | |||||||||||
| B75B | IN A,($FE) | Read the rows of the keyboard. | ||||||||||||
| B75D | CPL | Invert the bits, so that a bit is set for a key which is pressed. | ||||||||||||
| B75E | AND %00011111 | Keep only bits 0 to 4. | ||||||||||||
| B760 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: B74D | Up: Map | Next: B761 |