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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Symbol Math Instructions
Description
Flags
Precautions
Examples
388
Area
Index Registers
Indirect addressing
using Index Registers
/BL(435) divides BCD values in Dd and Dd+1 by those in Dr and Dr+1 and
outputs the quotient to R, R+1 and the remainder to R+2, R+3.
Dd + 1
Dr + 1
R + 3
R + 2
R + 1
Remainder
Name
Label
Error Flag
ER
Equals Flag
=
If Dd, Dd+1 and/or Dr, Dr+1 are not BCD or the content of Dr, Dr+1 is 0, an
error will be generated and the Error Flag will turn ON.
If as a result of the division, the content of R, R+1 is 00000000 hex, the
Equals Flag will turn ON.
When CIO 0.01 is ON in the following example, D201 and D200 will be
divided by D211 and D210 as 8-digit BCD values, the quotient will be output
to D221 and D220, and the remainder will be output to D223 and D222.
0.01
D200
D210
D220
Dd
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
(BCD)
Dd
(BCD)
Dr
R
(BCD)
Quotient
Operation
ON when Dd, Dd+1 is not BCD.
ON when Dr, Dr +1 is not BCD.
OFF in all other cases.
ON when the result is 0.
OFF in all other cases.
Section 3-10
Dr
R

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents