Mitsubishi Electronics FX Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-35
5.4.1 ROR (FNC 30)
Operation:
The bit pattern of the destination device (D) is rotated
n bit places to the ri
g
ht on ever
y
operation of the
instruction.
The status of the last bit rotated is copied to the carr
y
fla
g
M8022.
The example shown left is based on the instruction
noted above it, where the bit pattern represents the
contents of D0.
5.4.2 ROL (FNC 31)
Operation:
The bit pattern of the destination device (D) is rotated
n bit places to the left on ever
y
operation of the
instruction.
The status of the last bit rotated is copied to the carr
y
fla
g
M8022.
The example shown left is based on the instruction
noted above it, where the bit pattern represents the
contents of D0.
Mnemonic Function
Operands
Program steps
Dn
ROR
FNC 30
(Rotation
ri
g
ht)
The bit pattern of
the destination
device is rotated
‘n’ places to the
ri
g
ht on ever
y
execution
KnY, KnM, KnS,
T, C, D, V, Z
Note:
16 bit operation
Kn=K4,
32 bit operation Kn=K8
K, H,
Note:
16 bit operation n
16
32 bit operation n
32
ROR, RORP:
5 steps
DROR,
DRORP:
9 steps
Mnemonic Function
Operands
Program steps
SD
ROL
FNC 31
(Rotation
left)
The bit pattern of
the destination
device is rotated
‘n’ places to the
left on ever
y
execution
KnY, KnM, KnS,
T, C, D, V, Z
Note:
16 bit operation
Kn= K4,
32 bit operation
Kn= K8
K, H,
Note:
16 bit operation n
16
32 bit operation n
32
ROL,ROLP:
5 steps
DROL,
DROLP:
7 steps
[ D ] [ n ]
X0
D 0 K 4
ROR
M8022
0
Carry
M8022
111111110000000 0
0000111111110000
After 1 rotation
MSB
LSB
X0
D 0
[ D ]
K 4
[ n ]
ROL
111111110000000 0
111100000000111 1
M8022
1
Carry
M8022
After 1 rotation
LSB
MSB