Motorola DSP96002 User Manual

Page 569

Advertising
background image

B-50

DSP96002 USER’S MANUAL

MOTOROLA

;shift other part 1 1 or d1,d0 ;merge

bits together 1 1

--- ---

Totals: 4 4

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.

Program

ICycles

Words

move #32,d1.l ;get 32 1 1 sub

d2,d1 d2.l,d1.h ;32-shift, move shift 1 1 move

d1.l,d0.h ;move other shift 1 1 lsr d0,d0 d0.l,d1.l

;shift, copy input 1 1 lsl d1,d1 ;shift

other part 1 1 or d1,d0 ;merge bits

together 1 1

--- ---

Totals: 6 6

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.

Advertising