![]() |
Routines |
| Prev: 45189 | Up: Map | Next: 45273 |
|
Used by the routine at ReadControls.
Reads the Kempston joystick.
|
||||
| ReadKempstonJoystick | 45236 | IN A,(31) | Read the joystick. | |
| 45238 | LD C,0 | Clear the controls. | ||
| 45240 | BIT 0,A | Jump if the joystick is not pushed right. | ||
| 45242 | JR Z,ReadKempstonJoystick_Left | |||
| 45244 | SET 0,C | Set the bit for turning right. | ||
| ReadKempstonJoystick_Left | 45246 | BIT 1,A | Jump if the joystick is not pushed left. | |
| 45248 | JR Z,ReadKempstonJoystick_Down | |||
| 45250 | SET 1,C | Set the bit for turning left. | ||
| ReadKempstonJoystick_Down | 45252 | BIT 2,A | Jump if the joystick is not pushed down. | |
| 45254 | JR Z,ReadKempstonJoystick_Up | |||
| 45256 | SET 6,C | Set the bit for the action key. | ||
| ReadKempstonJoystick_Up | 45258 | BIT 3,A | Jump if the joystick is not pushed up. | |
| 45260 | JR Z,ReadKempstonJoystick_Fire | |||
| 45262 | SET 2,C | Set the bit for moving forward. | ||
| ReadKempstonJoystick_Fire | 45264 | AND 16 | Jump to finish if the fire button is not pressed. | |
| 45266 | JR Z,FinishJoystickControls | |||
| 45268 | SET 3,C | Set the bit for firing the second weapon. | ||
| 45270 | JP FinishJoystickControls | Jump to finish. | ||
|
View the equivalent code in;
|
||||
| Prev: 45189 | Up: Map | Next: 45273 |