Difference between revisions of "83Plus:BCALLs:4C30"

From WikiTI
Jump to: navigation, search
 
(added that length of 1 clears ram)
 
Line 18: Line 18:
  
 
== Comments ==
 
== Comments ==
This routine uses an LDIR instruction to clear the memory block, so do not pass it a block length of 0 or it will erase 65536 bytes.
+
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 ==
 
== Example ==

Latest revision as of 09:00, 9 July 2010

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