dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 271

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ASR
Operation:
(see figure)
Description: Arithmetically shift the destination operand (D) 1 bit to the right and store the result in the destination
Example:
Explanation of Example:
Condition Codes Affected:
Freescale Semiconductor
Before Execution
B2
SR
A
accumulator. The LSB of the destination prior to the execution of the instruction is shifted into C, and
the MSB of the destination is held constant. A duplicate destination is not allowed when ASR is used
in conjunction with a parallel read.
ASR
Prior to execution, the 36-bit B accumulator contains the value $A:A864:A865. Execution of the
ASR B instruction shifts the 36-bit value in the B accumulator 1 bit to the right and stores the result
back in the B accumulator. C is set by the operation because bit 0 of B was set prior to the execution
of the instruction. The N bit of CCR (bit 3) is also set because bit 35 of the result in B is set. The E bit
of CCR (bit 5) is set because the signed integer portion of B is used by the result.
See Section 3.6.5, “16-Bit Destinations,” Section 3.6.2, “36-Bit Destinations — CC Bit Set,” and
Section 3.6.4, “20-Bit Destinations — CC Bit Set.”
LF
15
A864
0300
14
B1
*
D2
SZ — Set according to the standard definition of the SZ bit (parallel move)
L
E
U
N
Z
V
C
13
*
— Set if data limiting has occurred during parallel move
— Set if the extension portion of accumulator result is in use
— Set according to the standard definition of the U bit
— Set if MSB of result is set
— Set if result equals zero
— Always cleared
— Set if bit 0 of source operand was set prior to the execution of the instruction
B
12
*
MR
D1
11
*
Arithmetic Shift Right
A865
B0
10
*
Instruction Set Details
X:(R2)+,Y0
I1
9
Assembler Syntax:
ASR
ASR
I0
8
D0
SZ
7
After Execution
L
6
B2
SR
D
E
5
D
D
; divide B by 2,
;
C
U
4
CCR
5432
0329
B1
update R2, load Y0
N
3
(single parallel move)
Z
2
V
(single parallel move)
1
5432
C
0
B0
ASR
A-41

Related parts for dsp56800