Prev: 58800 Up: Map Next: 58820
58810: Fill Memory
Used by the routines at StartGame and ClearPixels.
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 58810 LD E,0 Set E to 0.
This entry point is used by the routine at ClearAttributes.
Fill the memory, and loop back until all of the bytes have been filled.
FillMemory_WithValue 58812 LD (HL),E Write E.
58813 INC HL Increment HL.
58814 DEC BC Decrement BC.
58815 LD A,B Jump to FillMemory_WithValue if BC is not zero.
58816 OR C
58817 JR NZ,FillMemory_WithValue
58819 RET Return.
Prev: 58800 Up: Map Next: 58820