341
BSFR, BSFRP, BSFL, BSFLP
1
2
3
4
4
6
7
8
7.3 Shift instruction
7.3.2 BSFR, BSFRP, BSFL, BSFLP
[Operation]
: Head number of the devices to be shifted (bits)
n : Number of devices to which shift is executed (BIN 16 bits)
Function
BSFR
(1) Shifts the data in n points from the device designated by to the right by one bit.
(2) The device designated by + (n-1) is filled with 0.
BSFL
(1) Shifts the data in n points from the device designated by to the left by one bit.
(2) The device designated by is filled with 0.
7.3.2 BSFR, BSFRP 1-bi t shift to right of n-bit data
BSFL, BSFLP 1-bit shift to l eft of n-bit data
7.3.2
BSFR, BSFRP, BSFL, BSFLP
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
–– ––
n ––
00
11
00
11
100 11000
X14X13
X13X14
1
X17 X10
X17 X10
Carry flag
(SM700)
Filled with 0s.
X12
Basic
Process
High
performance
Redundant
Universal
LCPU
Command
Command
P
D
n
D
n
BSFR, BSFL
BSFRP, BSFLP
indicates an instruction symbol of BSFR/BSFL.
D
D
D
DD
0
Carry flag
(SM700)
Filled with 0
110 110
011 01
1
n
D D D D
DD D D D D
+(n-1)+(n-2)+(n-3)
+(n-1)+(n-2)+(n-3)
+2
+1
+2
+1
D
D
DD D D D D
DD D D D D
1
Carry flag
(SM700)
Filled with 0
110 011
100 110
+(n-1)
+(n-2)+(n-3)+2 +1
+(n-1)
+(n-2)+(n-3)+2 +1
D