Prev: 56309 Up: Map Next: 56396
56385: 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 56362
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
56385 LD A,D Get first graphic byte
56386 CPL Invert it
56387 AND (HL) AND with screen byte (i.e. keeps existing screen byte, clears sprite byte)
56388 LD (HL),A ...and put back on screen.
56389 INC HL Move right one character square
56390 LD A,E Get second graphic byte
56391 CPL Invert it
56392 AND (HL) AND with screen byte (i.e. keeps existing screen byte, clears sprite byte)
56393 LD (HL),A ...and draw the remainder of the byte back on screen.
56394 JR 56403 Byte now erased
Prev: 56309 Up: Map Next: 56396