90
Comparison Instructions
Section 3-5
SIGNED BINARY
COMPARE
CPS
!CPS
*1
114
Output
Required
DOUBLE
SIGNED BINARY
COMPARE
CPSL
115
Output
Required
MULTIPLE COM-
PARE
MCMP
@MCMP
019
Output
Required
TAB LE COM-
PARE
TCMP
@TCMP
085
Output
Required
UNSIGNED
BLOCK COM-
PARE
BCMP
@BCMP
068
Output
Required
Instruction
Mnemonic
Code
Symbol/Operand Function Location
Execution
condition
CPS(114)
S
1
S
2
S1: Comparison
data 1
S
2: Comparison
data 2
(>, >=, =, <=, <, <>)
Compares two signed binary values (constants and/or the contents of
specified words) and outputs the result to the Arithmetic Flags in the
Auxiliary Area.
Signed binary
comparison
Arithmetic Flags
CPSL(115)
S
1
S
2
S1: Comparison
data 1
S
2: Comparison
data 2
S1+1
S2+1
(>, >=, =, <=, <, <>)
R
Compares 16 consecutive words with another 16 consecutive words
and turns ON the corresponding bit in the result word where the
contents of the words are not equal.
Comparison
0: Words
are equal.
1: Words
aren't
equal.
TCMP(085)
S
T
R
S: Source data
T: 1st word of
table
R: Result word
R
Compares the source data to the contents of 16 words and turns
ON the corresponding bit in the result word when the contents are
equal.
Comparison
1: Data are
equal.
0: Data aren't
equal.
BCMP(068)
S
T
R
S: Source data
T: 1st word of
table
R: Result word
T+3
1
0
14
15
T+29
T+31
T+1
T+2
T+28
T+30
T
S
R
to
to
to
to
Ranges
Upper limit
Source data
Lower limit
1: In range
0: Not in range
Compares the source data to 16 ranges (defined by 16 lower limits
and 16 upper limits) and turns ON the corresponding bit in the result
word when the source data is within the range.