Prev: DBF5 Up: Map Next: DC4C
DC41: Draw/erase graphics - erase graphic bytes
Input
DE Two graphic bytes to erase - these were originally a single graphics byte whose bits have been rotated into two bytes by the previous routine at DC2A
HL Screen display address to erase byte from
Erases graphic bytes on screen by inverting them (CPL) and then AND-ing with the screen bytes to preserve any other background graphics
DC41 LD A,D Get first graphic byte
DC42 CPL Invert it
DC43 AND (HL) AND with screen byte (i.e. keeps existing screen byte, clears sprite byte)
DC44 LD (HL),A ...and put back on screen.
DC45 INC HL Move right one character square
DC46 LD A,E Get second graphic byte
DC47 CPL Invert it
DC48 AND (HL) AND with screen byte (i.e. keeps existing screen byte, clears sprite byte)
DC49 LD (HL),A ...and draw the remainder of the byte back on screen.
DC4A JR $DC53 Byte now erased
Prev: DBF5 Up: Map Next: DC4C