84PCE:Syscalls:0210E0
From WikiTI
Revision as of 10:14, 26 May 2015 by MateoConLechuga (Talk | contribs)
Synopsis
Official Name: MemSet
Syscall Address: 0210E0h
Sets a block of memory to the value in A.
Inputs
- HL: Address of memory block.
- BC: Number of bytes to zero.
- A: Value to set memory block to.
Outputs
- DE: Points to byte after memory block.
Destroys
- AF, BC, HL
Comments
This routine uses an LDIR instruction to clear the memory block, so do not pass it a block length of 0 or 1 or it will erase 16777216 bytes.
Example
;Clear out pixelShadow with spaces ld a,' ' ld hl,pixelShadow ld bc,8400 call _MemSet