Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 393

Table of Contents

Advertisement

Flags
Name
Error Flag
ER
Equals Flag
=
Carry Flag
CY
Overflow Flag
OF
Underflow Flag
UF
Negative Flag
N
Function
–(400) subtracts the binary values in Su from Mi and outputs the result to R. When the result is
negative, it is output to R as a 2's complement.
–L
–L(411) subtracts the binary values in Su and Su+1 from Mi and Mi+1 and outputs the result to R, R+1.
When the result is negative, it is output to R and R+1 as a 2's complement.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Label
OFF
• ON when the result is 0.
• OFF in all other cases.
• ON when the subtraction results in a borrow.
• OFF in all other cases.
• 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 0000 to
7FFF hex.
• OFF in all other cases.
• ON when the leftmost bit of the result is 1.
• OFF in all other cases.
Mi
Su
CY will turn ON
CY
R
when there is a
borrow.
Mi+1
Su+1
CY will turn ON
R+1
CY
when there is a
borrow.
Operation
OFF
• ON when the result is 0.
• OFF in all other cases.
• ON when the subtraction results in a borrow.
• 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.
• 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.
• ON when the leftmost bit of the result is 1.
• OFF in all other cases.
(Signed binary)
(Signed binary)
(Signed binary)
(Signed binary)
Mi
(Signed binary)
Su
R
(Signed binary)
3. Instructions
–L
3
357

Advertisement

Table of Contents
loading

Table of Contents