| Routines

6980: Update the SRB for one column of a sprite

Used by the routine at 61B0. Sets the bits in the screen refresh buffer (SRB) that correspond to the four tiles in the left, middle or right column of a sprite.
Input
DE | Base address of the sprite UDG references
HL | SRB address corresponding to the top row of the sprite
6980 | LD B,$04 | There are 4 rows (and 3 columns) in a sprite
6982 | LD A,(DE) | Pick up a sprite UDG reference
6983 | INC D | Next row of the sprite
6984 | AND A | Is this the blank UDG?
6985 | JR Z,$6989 | Jump if so (no need to update this SRB byte)
6987 | SET 0,(HL) | Set the appropriate bit in the SRB byte; this instruction is modified by the routine at 61B0 before this routine is called
6989 | LD A,$04 | Point HL at the byte of the SRB corresponding to the next row of the screen
698B | ADD A,L
698C | LD L,A
698D | DJNZ $6982 | Jump back until all 4 squares in the column are done
698F | BIT 3,D | Return with the zero flag reset if we have just updated the SRB for the rightmost column of the sprite
6991 | RET