B-48
DSP96002 USER’S MANUAL
MOTOROLA
--- ---
Totals: 4 4
2.
Static rotate right 1-32 bits. The 32 bit integer to be rotated is in d0.l. The number of bits to
rotate is N. The resulting carry is the value of bit N-1 of the register. For example, if N=3 (three
bit rotate right), then the resulting carry will be the value of bit 2 of the register.
Program ICycles
Words
ror d0 d0.l,d1.l ;shift in carry, copy input 1 1
lsr #N-1,d0 ;shift up, pad with zeros 1 1
lsl #33-N,d1 ;shift down, set carry 1 1
or d1,d0 ;put numbers back 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 following example, the code for checking if the shift count is zero may
be eliminated if it is known that the shift count is greater than zero.
Program ICycles
Words
tst d2 ;see if shift count is zero 1 1
jeq _done ;yes, done 2 2
rol d0 d0.l,d1.l ;shift in carry, copy input 1 1
dec d2 #32,d3.l ;dec shift count, get 32 2 2
sub d2,d3 d2.l,d0.h ;get 32-shift, move count 1 1
lsl d0,d0 d3.l,d1.h ;shift, move shift count 1 1
lsr d1,d1 ;shift, set carry 1 1
or d1,d0 ;or bits together 1 1
_done --- ---
Totals: 10 10
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 following example, the code for checking if the shift is zero count may
be eliminated if it is known that the shift count is greater than zero.
Program ICycles
Words
tst d2 ;see if shift count is zero 1 1 jeq
_done ;yes, done 2 2 ror d0
d0.l,d1.l ;shift in carry, copy input 1 1 dec d2 #32,d3.l
;dec shift count, get 32 2 2 sub d2,d3 d2.l,d0.h ;get
32-shift, move count 1 1 lsr d0,d0 d3.l,d1.h ;shift,
move shift count 1 1 lsl d1,d1 ;shift, set
carry 1 1 or d1,d0 ;or bits together
1 1 _done --- ---
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......