Motorola DSP96002 User Manual page 571

32-bit digital signal processor
Table of Contents

Advertisement

3. Dynamic bit field extraction, zero extend. Register d1.l contains FOFF,
d2.l contains FSIZE.
move
d2,d3
d3.l,d4.h
;move 32-fsize-foff
off upper bits
1
Totals:
4. Dynamic bit field extraction, sign extend. Register d1.l contains FOFF,
d2.l contains FSIZE.
move
d2,d3
d3.l,d4.h
;move 32-fsize-foff
off upper bits
1
Totals:
5.
Static bit field insertion.
move
#32-fsize,d2
(fsize+foff),d2
;clear field
field to insert
field
B-52
#32,d3.l
;32-fsize
;32-fsize-foff, 32-fsize 1
1
1
1
1
6
6
#32,d3.l
;32-fsize
;32-fsize-foff, 32-fsize 1
1
1
1
1
6
6
#-1,d2.l
;keep field fsize long
;move to insertion
1
1
1
1
1
DSP96002 USER'S MANUAL
;register size
1
1
1
lsl
d0,d0
lsr
d0,d0
---
---
;register size
1
1
1
lsl
d0,d0
asr
d0,d0
---
---
;get all ones mask
1
1
1
lsl
#foff,d1
or
d1,d0
Program
ICycles
Words
1
1
1
sub
d1,d3
move
d3.l,d0.h
d4.h,d0.h
;shift
;right justify
Program
ICycles
Words
1
1
1
sub
d1,d3
move
d3.l,d0.h
d4.h,d0.h
;shift
;right justify
Program
ICycles
Words
1
1
lsl
1
1
lsr
andc
d2,d0
;insert bit
---
---
Totals:
6
6
sub
sub
#32-
;move
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents