7-49
BSFR(P),BSFL(P)
1
2
3
4
6
6
7
8
7.3 Shift instruction
7.3.2 1-bit shift to right or left of n-bit data (BSFR(P),BSFL(P))
7.3.2 1-bit shift to right or left of n-bit data (BSFR(P),BSFL(P))
BSFR(P),BSFL(P)
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.
: Head number of the devices to be shifted (bits)
n : Number of devices to which shift is executed (BIN 16 bits)
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
–– ––
n ––
Basic
Process
High
performance
Redundant
Universal
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 11
0
+(n-1)
+(n-2)+(n-3)+2 +1
+(n-1)
+(n-2)+(n-3)+2 +1
D