CRE Programmer's Guide
String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
8-35
Memory_Copy
Memory_Copy
The Memory_Copy functions copy a block of memory. These functions are not
available in the native CRE library.
dest
is a pointer to the destination to which the block is copied.
source
is a pointer to the beginning of the block to copy.
num_bytes
specifies the number of bytes to copy.
Return Value
The Memory_Copy functions return the address of the destination block, @dest.
Considerations
The Memory_Copy functions copy source to dest regardless of whether source
and
dest overlap. See also Memory_Move on page 8-37.
Example
STRING .EXT dst := ( 4D '<<' 17 ) + 65536D;
STRING .EXT src := ( 4D '<<' 17 );
! copies first 64K bytes of extended segment
CALL RTL_Memory_CopyX_(dst, src, 65536D);
INT PROC RTL_Memory_Copy_( dest, source, num_bytes );
STRING .dest; ! out
STRING .source; ! in
INT num_bytes; ! in TNS
only
INT(32) PROC RTL_Memory_CopyX_( dest, source, num_bytes );
STRING .EXT dest; ! out
STRING .EXT source; ! in
INT(32) num_bytes; ! in TNS
only