pTAL Reference Manual (H06.08+)
Statements
HP pTAL Reference Manual—523746-006
12-33
$FILL8, $FILL16, and $FILL32 Statements
$FILL8, $FILL16, and $FILL32 Statements
pTAL provides the built-in routines $FILL8, $FILL16, and $FILL32, which fill a data
area with repetitions of the same 8-bit, 16-bit, or 32-bit value, respectively. This
operation is sometimes referred to as a “smear.”
For more information, see $FILL8, $FILL16 and, $FILL32 in Section 15, Built-In
Routines.
Variables (including structure data items) are byte addressed or word addressed as
follows:
After a move, next-addr might point to the middle of an element, rather than to the
beginning of the element. If destination is word addressed and source is byte
addressed and you copy an odd number of bytes, next-addr will not point to an
element boundary.
BEGIN
FIXED f;
INT n[0:9];
INT i;
g ':=' f FOR 8 BYTES; ! OK: g is global
n ':=' m FOR 8 BYTES; ! OK: n is an array
n[3] ':=' m FOR 8 BYTES; ! OK: n is an array element
r ':=' m FOR 8 BYTES; ! OK: r is a reference param
i ':=' m FOR 8 BYTES; ! Warning
END;
Example 12-31. FILL16 Statement
$FILL16(a, a_size, 0);
Byte addressed
•
STRING simple variables
•
STRING arrays
•
Variables to which STRING simple pointers point
•
Variables to which STRING structure pointers point
•
Substructures
Word addressed
•
INT, INT(32), FIXED, REAL, or REAL(64) simple variables
•
INT, INT(32), FIXED, REAL, or REAL(64) arrays
•
Variables to which INT, INT(32), FIXED, REAL, or REAL(64)
simple pointers point
•
Variables to which INT structure pointers point
•
Structures
Example 12-30. MOVE Statement With Destination Shorter Than
Source (page2of2)










