Prev: 53048 Up: Map Next: 53347
53327: Paint One Column
Paints one attribute cell in each of the rows going up the screen, but only the cells inside the area of the terrain.
Input
B Number of rows
C Attribute value
DE 32
HL Attribute address of the bottom cell
PaintOneColumn 53327 CALL TestAttributeAddress Call TestAttributeAddress.
53330 JR Z,PaintOneColumn_Next Jump to PaintOneColumn_Next if the zero flag is set.
53332 LD A,L A=L.
53333 AND %00011111 Keep the bits of A that are set in 31.
53335 DEC A Step A back.
53336 CP 28 Jump to PaintOneColumn_Next if A is 28 or more.
53338 JR NC,PaintOneColumn_Next
53340 LD (HL),C Write C where HL points.
PaintOneColumn_Next 53341 AND A Is A zero?
53342 SBC HL,DE Subtract DE and the carry from HL.
53344 DJNZ PaintOneColumn Decrease B and jump to PaintOneColumn until none remain.
53346 RET Return.
Prev: 53048 Up: Map Next: 53347