84PCE:Syscalls:0210DC

From WikiTI
Jump to: navigation, search


Synopsis

Official Name: MemClear

Syscall Address: 0210DCh

Sets a block of memory to zero.

Inputs

  • HL: Address of memory block.
  • BC: Number of bytes to zero.

Outputs

  • DE: Points to byte after memory block.

Destroys

  • A = 0
  • HL = HL+BC
  • DE = HL+1+BC
  • BC = 0

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.

See also: MemSet

Example

      ;Clear out pixelShadow
      ld     hl,pixelShadow
      ld     bc,8400
      call   _MemClear