pTAL Conversion Guide

pTAL Built-In Routines
pTAL Conversion Guide527302-002
18-13
$ATOMIC_GET
Examples of $ATOMIC_DEP:
$ATOMIC_GET
$ATOMIC_GET, an atomic operation, gets (returns) the value of a variable.
var input
type:variable
is the variable whose value $ATOMIC_GET returns. var must be one of:
A one-byte, two-byte, or four-byte variable whose address is an integral
multiple of its width.
A bit field fully contained in a one-byte, two-byte, or four-byte variable that is
aligned on an even-byte boundary.
$ATOMIC_GET returns the value of var.
var value mask result
%H0000 %H1234 %HAAAA %H0220
%H0000 %H1234 %H5555 %H1010
%H0000 %H6789 %HAAAA %H2288
%H0000 %H6789 %H5555 %H1010
Sets condition code Yes
Sets $CARRY No
Sets $OVERFLOW No
Example 18-5. Call to $ATOMIC_GET Routine
INT var1;
INT var2;
var1 := $ATOMIC_GET(var2);
$ATOMIC_GET ( ) ;
VST610.vsd
var