Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 383

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Symbol Math Instructions
Description
Flags
Precautions
Note
Examples
350
Area
Timer Area
Counter Area
DM Area
Indirect DM addresses
in binary
Indirect DM addresses
in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
+BCL(407) adds the BCD values in Au and Au+1, Ad and Ad+1, and CY and
outputs the result to R, R+1.
Au+1
+
CY will turn
CY
ON when there
is a carry.
Name
Label
Error Flag
ER
Equals Flag
=
Carry Flag
CY
If Au, Au +1 or Ad, Ad +1 are not BCD, an error is generated and the Error
Flag will turn ON.
If as a result of the addition, the content of R, R +1 is 00000000 hex, the
Equals Flag will turn ON.
If an addition results in a carry, the Carry Flag will turn ON.
To clear the Carry Flay (CY), execute the Clear Carry (CLC(041)) instruction.
When CIO 0.01 is ON in the following example, D1001, D1000, D1101,
D1100, and CY will be added as 8-digit BCD values, and the result will be out-
put to D1201 and D1200.
0.01
D1000
D1100
D1200
Au
T0000 to T4094
C0000 to C4094
D0 to D32766
@ D0 to @ D32767
*D0 to *D32767
#00000000 to #99999999 (BCD)
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Au
(BCD)
(BCD)
Ad+1
Ad
CY
(BCD)
R+1
R
Operation
ON when Au, Au +1 is not BCD.
ON when Ad, Ad +1 is not BCD.
OFF in all other cases.
ON when the result is 0.
OFF in all other cases.
ON when the addition results in a carry.
OFF in all other cases.
Section 3-10
Ad
R
---

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents