![Omron CJ1G-CPUxx Instructions Manual Download Page 299](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491299.webp)
278
Comparison Instructions
Section 3-7
Description
ZCPL(116) compares the 32-bit signed binary data in CD+1, CD with the
range defined by LL+1, LL and UL+1, UL and outputs the result to the Greater
Than, Equals, and Less Than Flags in the Auxiliary Area. (The Less Than or
Equal, Greater Than or Equal, and Not Equal Flags are left unchanged.)
Arithmetic Flag Status
The following table shows the status of the Arithmetic Flags after execution of
ZCPL(116).
Using ZCPL(116) Results in the Program
When ZCPL(116) is executed, the result is reflected in the Arithmetic Flags.
Control the desired output or right-hand instruction with a branch from the
same input condition that controls ZCPL(116).
Do not program another instruction between ZCPL(116) and the instruction
controlled by the Arithmetic Flag because the other instruction might change
the status of the Arithmetic Flag.
The operation of ZCPL(116) is almost identical to that of ZCP(088) except that
ZCPL(116) compares 32-bit values instead of 16-bit values. Refer to 3-7-10
AREA RANGE COMPARE: ZCP(088) for diagrams showing how to use
results in the program and an example program section.
Flags
Indirect DM/EM
addresses in binary
@ D00000 to @ D32767
@ E00000 to @ E32767
@ En_00000 to @ En_32767
(n = 0 to C)
Indirect DM/EM
addresses in BCD
*D00000 to *D32767
*E00000 to *E32767
*En_00000 to *En_32767
(n = 0 to C)
Constants
#0000 0000 to #FFFF FFFF
(binary)
Data Registers
---
Index Registers
IR0 to IR15
Indirect addressing using
Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area
CD
LL
UL
ZCPL(116)Result
Flag status
>
=
<
CD+1, CD > UL+1, UL
ON
OFF
OFF
CD+1, CD = UL+1, UL
OFF
ON
LL+1, LL < CD+1, CD < UL+1, UL
CD+1, CD = LL+1, LL
CD+1, CD < LL+1, LL
OFF
ON
Name
Label
Operation
Error Flag
ER
ON if LL+1, LL > UL+1, UL.
Greater Than Flag
>
ON if CD > UL+1, UL.
OFF in all other cases.
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...