pTAL Conversion Guide

pTAL Built-In Routines
pTAL Conversion Guide527302-002
18-14
$ATOMIC_OR
$ATOMIC_OR
$ATOMIC_OR, an atomic operation, performs a logical “or” operation (bitwise “or”—
LOR) on a variable and a mask and stores the result in the variable.
var input,output
INT:variable
is the variable to which $ATOMIC_OR apples 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
Examples of $ATOMIC_OR:
Sets condition code Yes (according the final value of var )
Sets $CARRY No
Sets $OVERFLOW No
Example 18-6. Call to $ATOMIC_OR Routine
INT var;
INT mask;
$ATOMIC_OR(var, mask);
var mask result
%H1234 %HAAAA %HBABC
%H1234 %H5555 %H5775
%H6789 %HAAAA %HEFAB
%H6789 %H5555 %H77DB
$ATOMIC_OR ( , ) ;
VST611.vsd
var mask