339
SFR, SFRP, SFL, SFLP
1
2
3
4
4
6
7
8
7.3
S
hift instruction
7.3.1
S
FR, SF
RP, SFL, SF
LP
7.3
Shift instruction
: Head number of the devices where shift data is stored (BIN 16 bits)
n
: Number of shifts (0 to 15) (BIN 16 bits)
Function
SFR
(1) Causes a shift to the right by n bits of the 16-bit data from the device designated at .
The n bits from the upper bit are filled with 0s.
(2) When a bit device is designated for , a right shift is executed within the device range specified by digit specification.
The number of bits by which a shift is executed is the remainder of n/(specified number of bits).
For example, when n 15 and (specified number of bits) 8 bits, the remainder of 15/8 1 is "7", and the data is
shifted 7 bits.
(3) Specify any of 0 to 15 as n. If the value specified as n is 16 or greater, the remainder of n/16 is used for a shift to the
right.
For example, when n 18, the data is shifted 2 bits to the right since the remainder of 18/16 1 is 2.
SFR, SFRP
n-bit shift to right of 16-bit data
SFL, SFLP
n-bit shift to left of 16-bit data
7.3.1
SFR, SFRP, SFL, SFLP
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
LCPU
Command
Command
P
D
n
D
n
SFR, SFL
SFRP, SFLP
indicates an instruction s
y
mbol of SFR/SFL.
D
D
D
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
0
0
0
0
0
0
1
1
1
0
1
1
1
0
1
1
b15
b8
b0
b7
b0
b7
b15
b8
1
b14 b13 b12 b11b10 b9
b6 b5 b4 b3 b2 b1
b14 b13 b12 b11b10 b9
b6 b5 b4 b3 b2 b1
Carr
y
flag
(
SM700
)
Filled with 0s.
W
hen n=6:
D
D
D
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
1
0
1
0
1
0
1
0
Y18
Y10
Y17
Y10
Y17
Y18
1
Y1B
Y14 Y13
Y1B
Y14 Y13
Carr
y
flag
(
SM700
)
W
hen n = 4:
Filled with 0s.