2 Instructions
2-166
CP1E CPU Unit Instructions Reference Manual(W483)
–/–L
Applicable Program Areas
Operands
Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
SIGNED BINARY SUBTRACT
WITHOUT CARRY
– @– 410
Subtracts 4-digit (single-word) hexadecimal data
and/or constants.
DOUBLE SIGNED BINARY
SUBTRACT WITHOUT
CARRY
–L @–L 411
Subtracts 8-digit (double-word) hexadecimal data
and/or constants.
Symbol
– –L
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description
Data type Size
– –L – –L
Mi
–: Minuend word
–L: First minuend word
INT DINT 1 2
Su
–: Subtrahend word
–L: First subtrahend word
INT DINT 1 2
R
–: Result word
–L: 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
– –L
Error Flag P_ER OFF OFF
Equals Flag P_EQ • ON when the 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 subtraction results in a borrow.
• OFF in all other cases.
Overflow Flag P_OF • ON when the result of subtracting a negative num-
ber 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 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 negative num-
ber from a positive number is in the range 0000 to
7FFF hex.
• OFF in all other cases.
• ON when the result of subtracting a positive num-
ber 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
-(410)
R
Mi
Su
Mi: Minuend word
Su: Subtrahend word
R: Result word
-L(410)