pTAL Reference Manual (H06.03+)
Built-In Routines
HP pTAL Reference Manual—523746-005
15-6
$ATOMIC_AND
$ATOMIC_AND
$ATOMIC_AND performs an atomic LAND on two INT values.
var input,output
sINT:variable
is the variable to which $ATOMIC_AND applies mask.
mask input
INT:value
is a 16-bit mask that $ATOMIC_AND applies to var.
$ATOMIC_AND performs the following operation:
var := var LAND mask
The read, LAND, and store operations are performed without interruption, as if the
three operations were one.
The following table shows examples of $ATOMIC_AND:
Sets condition code Yes (according the final value of var )
Sets $CARRY No
Sets $OVERFLOW No
Example 15-4. $ATOMIC_AND Routine
INT var;
INT mask;
$ATOMIC_AND(var, mask);
var value result
%H1234 %HAAAA %HBCDE
%H1234 %H5555 %H6789
%H6789 %HAAAA %H1233
%H6789 %H5555 %HBCDE
$ATOMIC_AND ( ) ;
VST608.vsd
var mask,










