pTAL Reference Manual (H06.08+)

Built-In Routines
HP pTAL Reference Manual523746-006
15-43
$FILL8, $FILL16, and $FILL32
area-to-fill
is a variable of any data type. The address of area-to-fill specifies the
beginning of the area to fill.
repetitions
is an INT expression whose value specifies the number of times to write.
value
is an expression whose value is a STRING value for $FILL8, to an INT value for
$FILL16, and to an INT(32) value for $FILL32.
$FILL16 and $FILL32 cause an alignment trap if area-to-fill is not aligned to at
least a 2-byte boundary.
$FILL32 performance is significantly degraded if area-to-fill is not aligned to at
least a 4-byte boundary.
None of the fill procedures ($FILL8, $FILL16, $FILL32) perform bounds-checking on
their parameters. If you write more bytes than the size of area-to-fill, the results
are undefined. You might overwrite other data in your program with no immediate error,
or you might cause any of several addressing errors, such as attempting to write in an
area for which you do not have write permission, attempting to write in an unmapped
page, and so forth.
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
Example 15-31. $FILL8 Procedure
PROC a MAIN;
BEGIN
STRUCT s(s_t);
...
CALL $FILL8(s, $LEN(s), 0);
END;