83Plus:BCALLs:4C30

From WikiTI
Jump to: navigation, search

Synopsis

Official Name: MemClear

BCALL Address: 4C30

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

  • 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 65536 bytes.

Example

      ld     hl,appBackUpScreen
      ld     bc,768
      B_CALL MemClear