pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
int-expression
is an expression whose value is an INT or INT(32) value.
The data type of the expression returned by $COMP is the same as the data type of its argument.
Example 241 $COMP Routine
INT i;
INT(32) j;
i := $COMP(i);
j := $COMP(j);
$COUNTDUPS
$COUNTDUPS returns the number of consecutive words, starting at the beginning of a buffer, that
are equal to the first word in the buffer.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
srcaddr
input,output
EXTADDR:variable
an address. Starting at srcaddr, $COUNTDUPS scans 16-bit words until it encounters
two adjacent words that are not equal. At the end of the operation, srcaddr points to
the word that differs from the first word and which, therefore, terminated the scan. If there
are no duplicates in the buffer, srcaddr points immediately after the last two words it
compared—that is, at the first word $COUNTDUPS did not examine.
maxwords
input,output
Nonatomic Operations 299