Prev: 45340 Up: Map Next: 45485
45475: Fill Memory
Used by the routines at InitialiseGame, WinRound and ClearScreen.
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 45475 LD E,0 Set E to 0.
This entry point is used by the routine at ResetAttributes.
FillMemory_WithValue 45477 LD (HL),E Write E.
45478 INC HL Increment HL.
45479 DEC BC Decrement BC.
45480 LD A,B Loop back until the byte counter is zero.
45481 OR C
45482 JR NZ,FillMemory_WithValue
45484 RET Return.
Prev: 45340 Up: Map Next: 45485