pTAL Reference Manual (H06.03+)

Built-In Routines
HP pTAL Reference Manual523746-005
15-64
$MAX
virtaddr input
EXTADDR:value
is the beginning virtual address to lock. $LOCKPAGE calculates the page
associated with virtaddr.
$MAX
$MAX returns the maximum of two signed values.
expression
is a signed INT, INT(32), FIXED(fpoint ), REAL, or REAL(64) expression. Both
expressions must be of the same data type.
$MIN
$MIN returns the minimum of two signed values.
Example 15-56. $LOCKPAGE Routine
INT only_if_locked;
INT lock_count;
EXTADDR virtaddr;
$LOCKPAGE(only_if_locked, lock_count, virtaddr);
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
Example 15-57. $MAX Routine
REAL realval := -3E0;
max := $MAX (realval, 5E0); ! Return 5E0
$MAX ( expression , expression )
VST100.vsd
$MIN ( expression , expression )
VST101.vsd