pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
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.
Example 226 $ATOMIC_AND Routine
INT var;
INT mask;
$ATOMIC_AND(var, mask);
The following table shows examples of $ATOMIC_AND:
resultvaluevar
%HBCDE%HAAAA%H1234
%H6789%H5555%H1234
%H1233%HAAAA%H6789
%HBCDE%H5555%H6789
$ATOMIC_DEP
$ATOMIC_DEP atomically deposits bits into an INT variable.
Yes (according the final value of var )Sets condition code
NoSets $CARRY
NoSets $OVERFLOW
var
input,output
INT:variable
is the variable into which $ATOMIC_DEP deposits bits from value.
mask
input
INT:value
is a 16-bit mask word that determines which bits of value to deposit into var.
$ATOMIC_DEP stores into each bit position of var. The corresponding bit in value after
performing an “and” operation between the corresponding bits in value and mask.
278 Built-In Routines