Prev: 52074 Up: Map Next: 52097
52087: 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 52087 LD E,0 Set the value to write to 0.
FillMemory_WithValue 52089 LD (HL),E Write the value to the next byte.
52090 INC HL Move on to the next byte.
52091 DEC BC Decrement the byte counter by one.
52092 LD A,B Jump back to FillMemory_WithValue until all the bytes have been written.
52093 OR C
52094 JR NZ,FillMemory_WithValue
52096 RET Return.
Prev: 52074 Up: Map Next: 52097