Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
10 Applied Instructions (Rotation and Shift Operation)
10.4 RCL / Rotation Left with Carry
206
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation (RCL, RCLP)
"n" bits out of 16 bits of the device specified by and 1 bit (carry flag M8022) are rotated leftward.
The carry flag is intervened in the rotation loop. If M8022 has been set to ON or OFF before the rotation
instruction, the carry flag is transferred to the destination.
2. 32-bit operation (DRCL, DRCLP)
"n" bits out of 32 bits of the device specified by and 1 bit (carry flag M8022) are rotated leftward.
Leftward rotation data
Command input
Number of bits
to be rotated
RCL
EN
n
ENO
d
b15 to b13 (16-n+1) and the
head bit indicating the
carry flag ON/OFF status
are moved.
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
0
High order
Low order
Carry flag
b15b14b13b12b11b10b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Before shift b15 to b13
Before shift b11 to b0
High order
1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0
Low order
1
Leftward rotation
b15b14b13b12b11b10b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
The status
of the final
bit b12
(bit "16-n")
is stored.
"n" bits (in the case of K4)
b15 to b12
(16-n) are
moved.
"n" bits
Carry flag
M8022
Before shift
Carry flag M8022
Before shift
b12
When M8022
is ON
After the instruction
is executed once.
Before
execution
After
execution
Leftward rotation data
DRCL
EN
n
ENO
d
Command input
Number of bits
to be rotated
Carry flag
When M8022
is ON
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
0
Low order
b15b14b13b12b11b10b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
High order
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16
Before shift b27 to b0
High order
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
Low order
1
Leftward rotation
b15b14b13b12b11b10b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16
Before shift
b31 to b29
b31 to b29 (32-n+1) and the head
bit indicating the carry flag ON/OFF
status are moved.
The status
of the final
bit b28
(bit "32-n")
is stored.
"n" bits (in the case of K4)
b31 to b28
(b32-n) are
moved.
Before shift
Carry flag M8022
Carry flag
M8022
Before shift
b28
After the instruction
is executed once.
Before
execution
After
execution