pTAL Conversion Guide

pTAL Built-In Routines
pTAL Conversion Guide527302-002
18-11
$ATOMIC_AND
$ATOMIC_AND
$ATOMIC_AND, an atomic operation, performs a logical “and” operation (bitwise
“and”—LAND) on a variable and a mask and stores the in the variable.
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
Examples of $ATOMIC_AND:
Sets condition code Yes (according the final value of var )
Sets $CARRY No
Sets $OVERFLOW No
Example 18-3. Call to $ATOMIC_AND Routine
INT var;
INT mask;
$ATOMIC_AND(var, mask);
var value result
%H1234 %HAAAA %H0220
%H1234 %H5555 %H1010
%H6789 %HAAAA %H2288
%H6789 %H5555 %H1010
$ATOMIC_AND ( ) ;
VST608.vsd
var mask,