7.51
ASR (Arithmetic Shift to the Right Direction)
Makes an arithmetic right shift of the word data in "Ri" by "u4" bits, stores the result to
"Ri".
■ ASR (Arithmetic Shift to the Right Direction)
Assembler format:
ASR #u4, Ri
Ri >> u4 → Ri
Operation:
Flag change:
N: Set when the MSB of the operation result is "1", cleared when the MSB is "0".
Z: Set when the operation result is "0", cleared otherwise.
V: Unchanged
C: Holds the bit value shifted last. Cleared when the shift amount is "0".
Execution cycles:
1 cycle
Instruction format:
Example:
ASR #8, R3
N
Z
V
C
C
C
–
C
MSB
1
0
1
1
Instruction bit pattern :
1011 1000 1000 0011
R3
F F 0 F F F F F
N Z V C
CCR
0 0 0 0
Before execution
CHAPTER 7 DETAILED EXECUTION INSTRUCTIONS
1
0
0
0
u4
LSB
Ri
R3
F F F F 0 F F F
N Z V C
CCR
1 0 0 1
After execution
145