Important: The information in this document is obsolete and should not be used for new development.
BlockMove
To copy a sequence of bytes from one location in memory to another, you can use theBlockMoveprocedure.
PROCEDURE BlockMove (sourcePtr, destPtr: Ptr; byteCount: Size);
sourcePtr- The address of the first byte to copy.
destPtr- The address of the first byte to copy to.
byteCount- The number of bytes to copy. If the value of
byteCountis 0,BlockMovedoes nothing.DESCRIPTION
TheBlockMoveprocedure moves a block ofbyteCountconsecutive bytes from the address designated bysourcePtrto that designated bydestPtr. It updates no pointers.The
BlockMoveprocedure works correctly even if the source and destination blocks overlap.SPECIAL CONSIDERATIONS
You can safely callBlockMoveat interrupt time. Even though it moves memory,BlockMovedoes not move relocatable blocks, but simply copies bytes.The
BlockMoveprocedure currently flushes the processor caches whenever the number of bytes to be moved is greater than 12. This behavior can adversely affect your application's performance. You might want to avoid callingBlockMoveto move small amounts of data in memory if there is no possibility of moving stale data or instructions. For more information about stale data and instructions, see the discussion of the processor caches in the chapter "Memory Management Utilities" in this book.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forBlockMoveare
Registers on entry A0 Pointer to source A1 Pointer to destination D0 Number of bytes to copy
Registers on exit D0 Result code RESULT CODE
noErr 0 No error