338
DROL, DROLP, DRCL, DRCLP
Operation Error
(1) There is no operation error in the DROL(P) or DRCL(P) instruction.
Program Example
(1) The following program rotates the contents of D0 and D1, not including the carry flag, 4 bits to the left when XC is ON.
[Ladder Mode]
[List Mode]
[Operation]
(2) The following program rotates the contents of D0 and D1, including the carry flag, 4 bits to the left when XC is ON.
[Ladder Mode]
[List Mode]
[Operation]
Step
Instruction
Device
1
D0
,
D1
1
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
0
D0
,
D1
0
0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
b31
b16
b0
b15
b28b27
b2
4
b23
b20 b19
b12 b11
b8 b7
b
4
b3
Contents
of
b31
to
b28
before
execut
i
on
Contents
of
b27
to
b0
before
execut
i
on
0
1
Carr
y
f
l
ag
(
SM700
)
Carr
y
f
l
ag
(
SM700
)
Content
of
b28
before
execut
i
on
b31
b16
b0
b15
b28b27
b2
4
b23
b20 b19
b12 b11
b8 b7
b
4
b3
Step
Instruction
Device
1
D0
,
D1
1
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
0
D0
,
D1
0
*
*
*
0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
1 1 1
b31
b16
b0
b15
b28b27
b2
4
b23
b20 b19
b12 b11
b8 b7
b
4
b3
Contents
of
b31
to
b29
before
execut
i
on
Contents
of
b27
to
b0
before
execut
i
on
1
Carr
y
f
l
ag
(
SM700
)
Carr
y
f
l
ag
(
SM700
)
Content
of
b28
before
execut
i
on
Content
of
carr
y
f
l
ag
SM700
before
execut
i
on
b31
b16
b0
b15
b28b27
b2
4
b23
b20 b19
b12 b11
b8 b7
b
4
b3
:
O
N/
O
FF
status
of
the
carr
y
f
l
ag
depends
on
i
ts
status
before
the
execut
i
on
of
DRC
L.