Prev: 40206 Up: Map Next: 40239
40229: Erase Beam
Used by the routine at UpdateBeams.
Clears the pixels of a beam, which is a row of bytes that all share the same pattern.
Input
B Number of bytes
C Pattern of each byte
HL Screen address of the first byte
EraseBeam 40229 LD A,C Invert the pattern.
40230 CPL
40231 LD C,A
EraseBeam_Loop 40232 LD A,C Fetch the inverted pattern.
40233 AND (HL) Clear the pixels.
40234 LD (HL),A
40235 INC L Move on to the next byte of the row.
40236 DJNZ EraseBeam_Loop Loop back to EraseBeam_Loop for each byte.
40238 RET Return.
Prev: 40206 Up: Map Next: 40239