205
Bank 1
Bank 5
5-16 Comparison Instructions
Comparison Instructions are used for comparing data. All comparison instruc-
tions affect only the comparison flags and/or results output words. They do not
affect the content of the data being compared.
Refer to page 99 for information explanations on comparison instructions sup-
ported by version-2 CVM1 CPUs.
5-16-1 COMPARE: CMP(020)
Cp
2
: 2
nd
compare word CIO, G, A, T, C, #, DM, DR, IR
Cp
1
: 1
st
compare word CIO, G, A, T, C, #, DM, DR, IR
Operand Data AreasLadder Symbol
Variations
! CMP(020)
(020)
CMP Cp
1
Cp
2
When the execution condition is OFF, CMP(020) is not executed. When the ex-
ecution condition is ON, CMP(020) compares Cp
1
and Cp
2
and outputs the re-
sult to the GR, EQ, and LE Flags in the Auxiliary Area.
If !CMP(020) is used, any input bits used for Cp
1
and Cp
2
are refreshed just be-
fore execution.
CMP(020) is an intermediate instruction, like NOT(010), CMPL(021), and
EQU(025). Intermediate instructions are entered between conditions or be-
tween a condition and a right-hand instruction. Intermediate instructions cannot
be placed at the end of an instruction.
When comparing a value to the PV of a timer or counter, the value must be in
BCD.
Description
Precautions
Comparison Instructions Section 5-16