Prev: 655E Up: Map Next: 6618
65ED: Clear Rows Under Picture
Used by the routines at DescribeLocation and WaitForKey.
Blanks the pixel rows down to the bottom of the text window. Pictures on start at row 0C, under the illustration. Pictures off start at row 0.
ClearLowerRows 65ED LD A,($66D6) Pictures off start clearing at row 0.
65F0 OR A
65F1 JR Z,ClearLower_Adjust
65F3 LD A,$0C Pictures on start at row 0C.
ClearLower_Adjust 65F5 DEC A Pictures off arrive here with zero, so this wraps to FF.
ClearLower_Row 65F6 INC A The increment restores row 0, or restores 0C when pictures are on.
65F7 LD HL,$5B97 Stop when this row reaches the bottom row.
65FA LD B,(HL)
65FB CP B
65FC RET Z
65FD CALL RowAddress Address of this character row.
6600 PUSH DE
6601 POP HL
6602 INC DE Eight pixel rows, filled from the next byte.
6603 LD B,$08
ClearLower_Pixel 6605 PUSH HL Save the row.
6606 PUSH DE
6607 PUSH BC
6608 LD BC,$001F Blank the rest of the pixel row.
660B LD (HL),$00
660D LDIR
660F POP BC Restore the row from the stack.
6610 POP DE
6611 POP HL
6612 INC D The next pixel row.
6613 INC H
6614 DJNZ ClearLower_Pixel All eight.
6616 JR ClearLower_Row The next character row.
Prev: 655E Up: Map Next: 6618