Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
7-47
SFR(P),SFL(P)
1
2
3
4
6
6
7
8
7.3 Shift instruction
7.3.1 n-bit shift to right or left of 16-bit data (SFR(P),SFL(P))
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.
SFL
(1) Shifts 16-bit data at device designated by n bits to the left.
Bits starting from the lowest bit to n bit are filled with 0s.
(2) When a bit device is designated for , a left 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 left.
For example, when n 18, the data is shifted 2 bits to the left since the remainder of 18/16
1 is "2".
Operation Error
(1) There are no operation errors associated with the SFR(P) or SFL(P) instructions.
D
1111001100001111
0000
1111
00000000
b15 b8 b0
b7
b0
b7
b15 b8
1
b14b13b12b11b10 b9 b6
b5
b4 b3 b2 b1
b14b13b12b11b10 b9 b6
b5
b4 b3 b2 b1
Carry flag
(SM700)
Filled with 0s.
When n=8:
D
D
D
00
11
00
11
100 11000
X14X13
X13X14
1
X17 X10
X17 X10
Carry flag
(SM700)
Filled with 0s.
X12