![]() |
Routines |
| Prev: D979 | Up: Map | Next: D9A8 |
|
Used by the routine at DrawVerticalEdge.
Moves the screen address in HL one cell to the left when the horizontal speed is negative. The last four instructions, which would move it back and count a step less, cannot be reached because the speed is known to be negative.
|
||||||||||||||||
| AdjustEdgeAddress | D990 | LD A,($CCBB) | The horizontal scroll speed. | |||||||||||||
| D993 | BIT 7,A | Return if bit 7 of A is clear. | ||||||||||||||
| D995 | RET Z | |||||||||||||||
| D996 | DEC L | Step L back. | ||||||||||||||
| D997 | LD A,($CE44) | The segment row. | ||||||||||||||
| D99A | CP $5F | Return if A is 5F or more. | ||||||||||||||
| D99C | RET NC | |||||||||||||||
| D99D | LD A,($CCBB) | The horizontal scroll speed. | ||||||||||||||
| D9A0 | NEG | Negate A. | ||||||||||||||
| D9A2 | BIT 7,A | Return if bit 7 of A is clear. | ||||||||||||||
| D9A4 | RET Z | |||||||||||||||
| D9A5 | INC L | Advance L. | ||||||||||||||
| D9A6 | DEC C | Step C back. | ||||||||||||||
| D9A7 | RET | Return. | ||||||||||||||
| Prev: D979 | Up: Map | Next: D9A8 |