C/–cl, Applicable program areas operands, Flags – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 206: 2 instructions, Operand specifications

2 Instructions
2-170
CP1E CPU Unit Instructions Reference Manual(W483)
–C/–CL
Applicable Program Areas
Operands
Operand Specifications
Flags
Instruction
Mnemonic
Variations
Function
code
Function
SIGNED BINARY SUBTRACT
WITH CARRY
–C
@–C
412
Subtracts 4-digit (single-word) hexadecimal data
and/or constants with the Carry Flag (CY).
DOUBLE SIGNED BINARY
SUBTRACT WITH CARRY
–CL
@–CL
413
Subtracts 8-digit (double-word) hexadecimal data
and/or constants with the Carry Flag (CY).
Symbol
–C
–CL
Area
Step program areas
Subroutines
Interrupt tasks
Usage
OK
OK
OK
Operand
Description
Data type
Size
–C
–CL
–C
–CL
Mi
–C: Minuend word
–CL: First minuend word
INT
DINT
1
2
Su
–C: Subtrahend word
–CL: First subtrahend word
INT
DINT
1
2
R
–C: Result word
–CL: First result word
INT
DINT
1
2
Area
Word addresses
Indirect DM addresses
Constants
CF
Pulse bits
TR bits
CIO
WR
HR
AR
T
C
DM
@DM
*DM
Mi, Su
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
---
---
---
R
---
Name
Label
Operation
–C
–CL
Error Flag
P_ER
OFF
OFF
Equals Flag
P_EQ
• ON when the subtraction result is 0.
• OFF in all other cases.
• ON when the result is 0.
• OFF in all other cases.
Carry Flag
P_CY
• ON when the subtraction results in a borrow.
• OFF in all other cases.
• ON when the results in a borrow.
• OFF in all other cases.
Overflow Flag
P_OF
• ON when the result of subtracting a negative num-
ber and CY from a positive number is in the range
8000 to FFFF hex.
• OFF in all other cases.
• ON when the result of subtracting a negative num-
ber and CY from a positive number is in the range
80000000 to FFFFFFFF hex.
• OFF in all other cases.
Underflow Flag
P_UF
• ON when the result of subtracting a positive num-
ber and CY from a negative number is in the
range 0000 to 7FFF hex.
• OFF in all other cases.
• ON when the result of subtracting a positive num-
ber and CY from a negative number is in the
range 00000000 to 7FFFFFFF hex.
• OFF in all other cases.
Negative Flag
P_N
• ON when the leftmost bit of the result is 1.
• OFF in all other cases.
• ON when the leftmost bit of the result is 1.
• OFF in all other cases.
R
Mi
Su
Mi: Minuend word
Su: Subtrahend word
R: Result word
–C(412)
–CL(413)
R
Mi
Su
Mi: Minuend word
Su: Subtrahend word
R: Result word