Prev: CB6A Up: Map Next: CB81
CB77: Fill Memory
Used by the routines at RunGame, ClearObjects and ClearScreenBuffer.
Fills an area of memory with zero. The entry point at FillMemory_WithValue fills it with the byte in E.
Input
BC Number of bytes
HL Address of the first byte
FillMemory CB77 LD E,$00 Set the value to write to 00.
FillMemory_WithValue CB79 LD (HL),E Write the value to the next byte.
CB7A INC HL Move on to the next byte.
CB7B DEC BC Decrement the byte counter by one.
CB7C LD A,B Jump back to FillMemory_WithValue until all the bytes have been written.
CB7D OR C
CB7E JR NZ,FillMemory_WithValue
CB80 RET Return.
Prev: CB6A Up: Map Next: CB81