Prev: 80B4 Up: Map Next: 80C2
80BB: Fill Memory
Used by the routine at ResetAttributes.
Writes a single byte to memory from the target address, up to (but not including) the first address whose high byte is the end value.
Input
HL Target address
B The high byte of the end address (the fill stops at an LSB of 00)
C Value to write
ResetCopier 80BB LD (HL),C Write the fill value to the byte at the target address.
80BC INC HL Move on to the next address.
80BD LD A,H Loop back to ResetCopier until the target address has reached the end address.
80BE CP B
80BF JR NZ,ResetCopier
80C1 RET Return.
View the equivalent code in;
Prev: 80B4 Up: Map Next: 80C2