8. Function Commands
DROL, DROLP
- 263 -
Program example
Program to rotate the D10, 11 data 3 bits to the left when M0 turns ON.
Coding
No. of
steps
Com-
mand
Device
10 LD XA
11 DMOV
H80000000
D0
15 LD M0
16 DROL D10 K3
H80000000
DMOV
D10
XA
10
D10DROL
K3
M0
15
(Pulse coding)
19
Before execution
After execution (n=3)
Transition
Carry flag
(SM12)
B15B31
B30
B29
B16
B2 B1 B0
D10
D11
B28B27
B5B4B3
B14
B17B18
To B0
1
0
0
0
000 00
00000 0
0
0
10
0
0
0
00
0
01
0
00 00
0
1
0000000000
00000
000 00
1000 0
0
000
0
0
00
To B0
To B0
(n=2)
(n=1)
B31 details
before execution
B31 details
when n=1
B31 details
when n=2
Left rotation of data using DROL command