519
Appendix B
Error and Arithmetic Flag Operation
The following table shows the instructions that affect the OF, UF, ER, CY, GR, LE and EQ flags.
In general, OF indicates that the result of a 16-bit calculation is greater than 32,767 (7FFF) or the result of a
32-bit calculation is greater than 2,147,483,647 (7FFF FFFF). UF indicates that the result of a 16-bit calcula-
tion is less than –32,768 (8000) or the result of a 32-bit calculation is less than –2,147,483,648 (8000 0000).
Refer to
SECTION 5 Instruction Set
for details.
ER indicates that operand data is not within requirements. CY indicates arithmetic or data shift results. GR indi-
cates that a compared value is larger than some standard, LT that it is smaller, and EQ, that it is the same. EQ
also indicates a result of zero for arithmetic operations. Refer to
SECTION 5 Instruction Set
for details.
Vertical arrows in the table indicate the flags that are turned ON and OFF according to the result of the instruc-
tion.
Although ladder diagram instructions, TIM, and CNT are executed when ER is ON, other instructions with a
vertical arrow under the ER column are not executed if ER is ON. All of the other flags in the following table will
also not operate when ER is ON.
Instructions not shown do not affect any of the flags in the table. Although only the non-differentiated form of
each instruction is shown, differentiated instructions affect flags in exactly the same way.
All 7 flags are turned OFF when END(01) is executed, so their status cannot be monitored with a Programming
Console.
Mnemonic
25503 (ER)
25504 (CY)
25505 (GR)
25506 (EQ)
25507 (LE)
25404 (OF)
25405 (UF)
Page
TIM
---
---
---
---
---
---
234
CNT
---
---
---
---
---
---
235
END (01)
OFF
OFF
OFF
OFF
OFF
OFF
OFF
227
CNTR(12)
---
---
---
---
---
---
237
TIMH(15)
---
---
---
---
---
---
238
WSFT(16)
---
---
---
---
---
---
262
CMP(20)
---
---
---
280
MOV(21)
---
---
---
---
---
269
MVN(22)
---
---
---
---
---
270
BIN(23)
---
---
---
---
---
291
BCD(24)
---
---
---
---
---
292
ASL(25)
---
---
---
---
263
ASR(26)
---
---
---
---
263
ROL(27)
---
---
---
---
264
ROR(28)
---
---
---
---
264
COM(29)
---
---
---
---
---
372
ADD(30)
---
---
---
---
317
SUB(31)
---
---
---
---
318
MUL(32)
---
---
---
---
---
320
DIV(33)
---
---
---
---
---
321
ANDW(34)
---
---
---
---
---
373
ORW(35)
---
---
---
---
---
374
XORW(36)
---
---
---
---
---
374