pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Copies count elements as follows (depending on the nature of the source variable):ELEMENTS
Units CopiedData TypeSource Variable
BytesSTRINGSimple variable
WordsINTArray
Simple pointer (including
structure item)
DoublewordsINT(32) or REAL
QuadruplewordsFIXED or REAL(64)
Structure occurrencesNot applicableStructure
Substructure occurrencesNot applicableSubstructure
Structure occurrencesStructure Pointer (STRING
and INT have meaning
STRING
INT
only in group comparison
expressions and move
statements.)
If count-unit is not BYTES, WORDS, or ELEMENTS, the compiler issues an error. If you
specify BYTES, WORDS, or ELEMENTS for count-unit, that term cannot also appear as a
LITERAL or DEFINE identifier in the global declarations or in any procedure or subprocedure
in which the move statement appears.
constant
is a numeric constant, a character string constant, or a LITERAL to copy.
If you enclose constant in brackets ([ ]) and if destination has a byte address or is a
STRING structure pointer, the system copies constant as a single byte regardless of the size
of constant. If you do not enclose constant in brackets or if destination has a word
address or is an INT structure pointer, the system copies a word, doubleword, or quadrupleword
as appropriate for the size of constant.
constant-list
is a list of constants to copy. Specify constant-list in the form shown in Chapter 3
(page 46).
next-addr
is a variable to contain the location in destination that follows the last item copied. The
compiler returns a 16-bit, 32-bit, or 64-bit address as described in “Usage Considerations”
that follows.
&
is the concatenation operator. It lets you move more than one source or constant-list,
each separated by the concatenation operator.
Usage Considerations
The following rules apply to using MOVE statements:
• A value parameter cannot be the target of a move statement.
• The compiler reports a warning if it can determine that there are more bytes in the source of
the move than in the destination of the move (see Destination Shorter Than Source (page 222)).
• Built-in routines, $FILL8, $FILL16, and $FILL32, fill an array with repetitions of the same 8-bit,
16-bit, or 32-bit data, respectively (see $FILL8, $FILL16, and $FILL32 Statements (page 222)).
• If the type of address specified as the next-addr is an extended address, it must be able to
safely store the address value. For example,
220 Statements