Topic: DMD0007

MEMCOPY - Copy Memory Range


The Copy Memory Range (MEMCOPY) instruction is used to copy bytes of data from one range of memory locations to another range of memory locations.

 

Note: The Copy Memory Range instruction does not consider block types so there is no data conversion applied during the copy operation.

 

The Copy Memory Range instruction is especially useful in moving structures into and out of guest protocol memory .

Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.

 

Start of Source - designates the first memory location of the data to copy. This can be any readable location (including structures).

 

Start of Destination - designates the first memory location of the where the data is to be copied. This can be any writable location (including structures).

 

Range - specifies the number of bytes of data to copy by selecting one of the following five options:
 

  • End of Source - calculates the number of bytes by specifying the last memory location in the range of values to copy. This memory location must be in the same block as the Start of Source, and the ID of the end memory location must be greater than the ID of the source memory location.
     

  • Number of Source Elements - calculates the number of bytes by specifying the number of source elements in the range. This can be any constant value up to the number of memory locations in the block, or any readable numeric location.
     

  • Number of Bytes - specifies the number of bytes of data to copy. This can be any constant value up to the number of bytes of memory in the block, or any readable numeric location.
     

  • Number of Destination Elements - calculates the number of bytes by specifying the number of destination elements in the range. This can be any constant value up to the number of memory locations in the destination data block, or any readable numeric location.
     

  • End of Destination - calculates the number of bytes by specifying the last memory location in the destination range. This memory location must be in the same block as the Start of Destination, and the ID of the end memory location must be greater than the ID of the source memory location.

 


Status Display:

The status display for the Copy Memory Range instruction will show the beginning and ending elements of the source and destinations ranges.

 


See Also:

 


Rung Example: