pTAL Reference Manual (H06.03+)

Statements
HP pTAL Reference Manual523746-005
12-30
Move
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
Section 3, Data Representation.
next-addr
is a variable to contain the location in destination that follows the last item
copied. The compiler returns a 16-bit or 32-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.
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 on page 12-32).
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 on page 12-33).
Example 12-26 on page 12-31 copies spaces into the first five elements of an array
and then uses next-addr as destination to copy dashes into the next five
elements.