Prev: 55673 Up: Map Next: 55720
55696: Adjust Edge Address
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.
Input
C Number of steps left
HL Screen address
Output
C Number of steps left
HL Screen address
AdjustEdgeAddress 55696 LD A,(52411) The horizontal scroll speed.
55699 BIT 7,A Return if bit 7 of A is clear.
55701 RET Z
55702 DEC L Step L back.
55703 LD A,(52804) The segment row.
55706 CP 95 Return if A is 95 or more.
55708 RET NC
55709 LD A,(52411) The horizontal scroll speed.
55712 NEG Negate A.
55714 BIT 7,A Return if bit 7 of A is clear.
55716 RET Z
55717 INC L Advance L.
55718 DEC C Step C back.
55719 RET Return.
Prev: 55673 Up: Map Next: 55720