![background image](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489104.webp)
83
Comparison Instructions
Section 3-5
Symbol Compari-
son (Double-
word, signed)
LD, AND, OR + =,
<>, <, <=, >, >=
+SL
303 (=)
308 (<>)
313 (<)
318 (<=)
323 (>)
328 (>=)
S
1
: Comparison
data 1
S
2
: Comparison
data 2
Symbol comparison instructions (double-word, signed) compare two values
(constants and/or the contents of specified double-word data) in signed 32-bit
binary (8-digit hexadecimal) and create an ON execution condition when the
comparison condition is true. There are three types of symbol comparison
instructions, LD (LOAD), AND, and OR.
LD: Not
required
AND, OR:
Required
UNSIGNED COM-
PARE
CMP
!CMP
020
Output
Required
DOUBLE
UNSIGNED COM-
PARE
CMPL
060
Output
Required
SIGNED BINARY
COMPARE
CPS
!CPS
114
Output
Required
DOUBLE
SIGNED BINARY
COMPARE
CPSL
115
Output
Required
MULTIPLE
COMPARE
MCMP
@MCMP
019
Output
Required
Instruction
Mnemonic
Code
Symbol/Operand
Function
Location
Execution
condition
S
1
: Comparison
data 1
S
2
: Comparison
data 2
CMP(020)
S
1
S
2
Unsigned binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
Compares two unsigned binary values (constants and/or the contents
of specified words) and outputs the result to the Arithmetic Flags in
the Auxiliary Area.
S
1
: Comparison
data 1
S
2
: Comparison
data 2
CMPL(060)
S
1
S
2
Unsigned binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
S1+1
S2+1
Compares two double unsigned binary values (constants and/or the
contents of specified words) and outputs the result to the Arithmetic
Flags in the Auxiliary Area.
S
1
: Comparison
data 1
S
2
: Comparison
data 2
CPS(114)
S
1
S
2
Signed binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
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.
S
1
: Comparison
data 1
S
2
: Comparison
data 2
CPSL(115)
S
1
S
2
Signed binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
S1+1
S2+1
Compares two double signed binary values (constants and/or the
contents of specified words) and outputs the result to the Arithmetic
Flags in the Auxiliary Area.
S
1
: 1st word of
set 1
S
2
: 1st word of
set 2
R: Result word
MCMP(019)
S
1
S
2
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.
R
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...