Prev: 45548 Up: Map Next: 45570
45554: Clear Pixel Block
Used by the routines at StartRound, ClearMessageArea and ClearLargeWindow.
Clears a rectangle of the display file.
Input
HL Screen address of the top left byte
B Width in bytes
C Height in pixel rows
ClearPixelBlock 45554 PUSH BC Save the dimensions.
45555 PUSH HL Save the screen address of the start of the row.
ClearPixelBlock_Byte 45556 LD (HL),0 Clear the current byte of the row.
45558 INC L Move on to the next byte.
45559 DJNZ ClearPixelBlock_Byte Loop back until the whole row has been cleared.
45561 POP HL Restore the screen address of the start of the row.
45562 CALL ScreenPosition1PixelBelow Move down to the next pixel row using ScreenPosition1PixelBelow.
45565 POP BC Restore the dimensions.
45566 DEC C Decrease the pixel row counter by one.
45567 JR NZ,ClearPixelBlock Loop back until every row has been cleared.
45569 RET Return.
Prev: 45548 Up: Map Next: 45570