Prev: A8F9 Up: Map Next: A921
A902: Scroll Area Left
Used by the routines at ShowTitleMenu and ScrollMessage.
Scrolls a rectangular area of the screen one pixel to the left, and increases the scroll counter at ScrollCounter.
Input
B The width of the area in bytes
C The height of the area in pixel lines
HL The pixel position of the right end of the bottom line of the area
ScrollAreaLeft A902 CALL GetScreenAddress Convert the pixel position into a screen address.
A905 LD A,B Fetch the width.
A906 LD ($A90C),A Store it in the operand of the instruction at A90B.
ScrollAreaLeft_Line A909 PUSH HL Save the address of the right end of the line.
A90A XOR A Clear the carry flag.
A90B LD B,$00 Set the number of bytes in the line (this is patched at A90C).
ScrollAreaLeft_Byte A90D RL (HL) Rotate the byte left through the carry flag.
A90F DEC L Move onto the next byte to the left.
A910 DJNZ ScrollAreaLeft_Byte Jump back until the line has been done.
A912 POP HL Restore the address of the right end of the line.
A913 CALL MoveUpALine Move up a pixel line.
A916 DEC C Decrease the number of lines by one.
A917 JR NZ,ScrollAreaLeft_Line Jump back until all of the lines have been done.
A919 LD A,($A921) Fetch the scroll counter.
A91C INC A Add one.
A91D LD ($A921),A Store it.
A920 RET Return.
Prev: A8F9 Up: Map Next: A921