
B.8Shift Instructions
218
F2MC-16F Instruction Lists
B.8 Shift Instructions
Table B.8a Shift Instructions (Byte, Word, Long-Word): 27 Instructions
*1:
3 when R0 is zero, otherwise 3 + (R0)
*2:
3 when R0 is zero, otherwise 4 + (R0)
*3:
3 when imm8 is zero, otherwise 3 + imm8
*4:
3 when imm8 is zero, otherwise 4 + imm8
The notation (a) in the - 'cycle count' column indicates a reference to Appendix B.4a.
The notation '+' in the # 'byte count' column indicates a reference to Appendix B.3.
The notations (b), (c) and (d) in the B (compensation value) column indicate a reference to Appendix B.4b.
Mnemonic
#
~
B
Operation
LH
AH
I
S
T
N
Z
V
C
RMW
RORC
A
ROLC
A
RORC
ear
RORC
eam
ROLC
ear
ROLC
eam
ASR
A,RO
LSR
A,RO
LSL
A,RO
ASR
A,#imm8
LSR
A,#imm8
LSL
A,#imm8
2
2+
2
2+
2
3
2
3+(a)
2
3+(a)
*1
*3
0
2x(b)
0
2x(b)
0
byte (A)
← Right rotate with carry
byte (A)
← Left rotate with carry
byte (ear)
← Right rotate with carry
byte (eam)
← Right rotate with carry
byte (ear)
← Left rotate with carry
byte (eam)
← Left rotate with carry
byte (A)
← Arithmetic right barrel shift (A,RO)
byte (A)
← Logical right barrel shift (A,RO)
byte (A)
← Logical left barrel shift (A,RO)
byte (A)
← Arithmetic right barrel shift (A,#imm8)
byte (A)
← Logical right barrel shift (A,#imm8)
byte (A)
← Logical left barrel shift (A,#imm8)
-
*
-
*
-
*
-
*
-
*
-
ASRW
A
LSRW
A / SHRW A
LSLW
A / SHLW A
ASRW
A,R0
LSRW
A,R0
LSLW
A,R0
ASRW
A,#imm8
LSRW
A,#imm8
LSLW
A,#imm8
1
2
3
2
*1
*3
0
word (A)
← Arithmetic right shift (A,1 bit)
word (A)
← Logical right shift (A,1 bit)
word (A)
← Logical left shift (A,1 bit)
word (A)
← Arithmetic right barrel shift (A,RO)
word (A)
← Logical right barrel shift (A,RO)
word (A)
← Logical left barrel shift (A,RO)
word (A)
← Arithmetic right barrel shift
(A,#imm8)
word (A)
← Logical right barrel shift (A,#imm8)
word (A)
← Logical left barrel shift (A,#imm8)
-
*
-
*
-
*
-
*
R
*
-
*
-
ASRL
A,RO
LSRL
A,RO
LSLL
A,RO
ASRL
A,#imm8
LSRL
A,#imm8
LSLL
A,#imm8
2
3
*2
*4
0
long (A)
← Arithmetic right barrel shift (A,RO)
long (A)
← Logical right barrel shift (A,RO)
long (A)
← Logical left barrel shift (A,RO)
long (A)
← Arithmetic right barrel shift (A,#imm8)
long (A)
← Logical right barrel shift (A,#imm8)
long (A)
← Logical left barrel shift (A,#imm8)
-
*
-
*
-
*
-
*
-