Motorola DSP96002 User Manual page 569

32-bit digital signal processor
Table of Contents

Advertisement

;shift other part
bits together
Totals:
3.
Dynamic rotate left 0-32 bits. The 32 bit integer to be rotated is in d0.l. The number of bits to
rotate is in d2.l.
In the special case of a zero shift count, the resulting carry is the most significant bit. In the
special case of a 32 shift count, the resulting carry is the least significant bit. In both cases, the
register shifted is unchanged.
move
d2,d1
d1.l,d0.h ;move other shift
;shift, copy input
other part
together
Totals:
4.
Dynamic rotate right 0-32 bits. The 32 bit integer to be rotated is in d0.l. The number of bits
to rotate is in d2.l.
In the special case of a zero shift count, the resulting carry is the least significant bit. In the
special case of a 32 shift count, the resulting carry is the most significant bit. In both cases,
the register shifted is unchanged.
B-50
1
1
1
4
4
#32,d1.l
d2.l,d1.h ;32-shift, move shift
1
1
1
1
1
6
6
DSP96002 USER'S MANUAL
1
or
d1,d0
---
---
;get 32
1
1
1
lsr
1
lsl
d1,d1
or
d1,d0
---
---
;merge
Program
ICycles
Words
1
1
sub
1
move
d0,d0
d0.l,d1.l
;shift
;merge bits
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents