| Ant Attack | Routines |
| Prev: 8034 | Up: Map | Next: 8090 |
|
Used by the routine at MOVE_PLAYER.
V (move) and C (jump) become bits 2 and 1 of the flags at +7, in one go. SYMBOL SHIFT and M turn the player, but only when not stunned.
|
||||||||
| READ_CONTROLS | 8060 | LD BC,$FEFE | CAPS SHIFT to V, made active high: C is bit 3, V bit 4. | |||||
| 8063 | IN A,(C) | |||||||
| 8065 | CPL | |||||||
| 8066 | AND $18 | Down to bits 1 and 2: jump and move. | ||||||
| 8068 | RRCA | |||||||
| 8069 | RRCA | |||||||
| 806A | LD E,A | Replace the player's jump and move bits with them. | ||||||
| 806B | LD A,(IX+$07) | |||||||
| 806E | AND $F9 | |||||||
| 8070 | OR E | |||||||
| 8071 | LD (IX+$07),A | |||||||
| 8074 | LD A,(IX+$06) | Stunned: no turning. | ||||||
| 8077 | AND A | |||||||
| 8078 | RET NZ | |||||||
| 8079 | LD B,$7F | SPACE to B: SYMBOL SHIFT is bit 1, M bit 2. | ||||||
| 807B | IN A,(C) | |||||||
| 807D | CPL | |||||||
| 807E | AND $06 | |||||||
| 8080 | CP $02 | SYMBOL SHIFT alone: turn one way... | ||||||
| 8082 | JR NZ,READ_CONTROLS_0 | |||||||
| 8084 | DEC (IX+$04) | |||||||
| 8087 | RET | |||||||
| READ_CONTROLS_0 | 8088 | CP $04 | ...M alone: the other. | |||||
| 808A | JR NZ,READ_CONTROLS_1 | |||||||
| 808C | INC (IX+$04) | |||||||
| READ_CONTROLS_1 | 808F | RET | ||||||
| Prev: 8034 | Up: Map | Next: 8090 |