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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Increment/Decrement Instructions
Description
Flags
Examples
0.01
Area
Index Registers
Indirect addressing
using Index Registers
The – –L(593) instruction subtracts 1 from the 8-digit hexadecimal content of
Wd+1 and Wd. The content of the specified words will be decremented by 1
every cycle as long as the execution condition of – –L(593) is ON. When the
up-differentiated variation of this instruction (@– –L(593)) is used, the content
of the specified words is decremented only when the execution condition has
gone from OFF to ON.
Wd+1
Wd
The Equals Flag will be turned ON if the result is 0000 0000, the Carry Flag
will be turned ON when a digit changes from 0 to F, and the Negative Flag will
be turned ON if bit 15 of Wd+1 is ON in the result.
Both the Carry Flag and the Negative Flag will be turned ON when the content
changes from 0000 0000 to FFFF FFFF.
Name
Label
Error Flag
ER
Equals Flag
=
Carry Flag
CY
Negative Flag
N
Operation of – –L(593)
In the following example, the 8-digit hexadecimal content of D201 and D200
will be decremented by 1 every cycle as long as CIO 0.01 is ON.
D200
Wd+1:
D201
0.01
Decrement Decrement
---
,IR0 to ,IR15
–2048 to +2047, IR0 to –2048 to +2047, IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Wd+1
Wd
Operation
OFF
ON if the result is 0000 0000 after execution.
OFF in all other cases.
ON if a digit in Wd+1 or Wd went from 0 to F during exe-
cution.
OFF in all other cases.
ON if bit 15 of Wd+1 is ON after execution.
OFF in all other cases.
Decremented every cycle
while CIO 0.01 is ON.
Wd:
D200
Wd+1:
1
: Execution of
L(593)
Decrement
Section 3-9
Wd
D201
Wd:
D200
Decrement
327

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents