pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Example 228 $ATOMIC_GET Routine
INT var1;
INT var2;
var1 := $ATOMIC_GET(var2);
if < then ... ! OK: $ATOMIC_GET sets condition code
$ATOMIC_OR
$ATOMIC_OR performs an atomic LOR on two INT values.
Yes (according the final value of var )Sets condition code
NoSets $CARRY
NoSets $OVERFLOW
var
input,output
INT:variable
is the variable to which $ATOMIC_OR applies mask.
mask
input
INT:value
is a 16-bit mask that $ATOMIC_OR applies to var.
$ATOMIC_OR performs the following statement:
var := var LOR mask
The read, LOR, and store operations are performed without interruption, as if the three operations
were one.
Example 229 $ATOMIC_OR Routine
INT var;
INT mask;
$ATOMIC_OR(var, mask);
The following table shows examples of $ATOMIC_OR:
resultmaskvar
%HBABC%HAAAA%H1234
%H5775%H5555%H1234
%HEFAB%HAAAA%H6789
%H77DB%H5555%H6789
$ATOMIC_PUT
$ATOMIC_PUT atomically puts a value into a variable.
280 Built-In Routines