Motorola DSP96002 User Manual page 577

32-bit digital signal processor
Table of Contents

Advertisement

Signed 32 Bit Integer
Division of d0 = d5/d2
eor
abs
abs
do
rol
rol
cmp
sub
dloop
rol
not
tst
neg
tst
neg
The final remainder is destroyed in the generation of the quotient. This program may calculate only the
number of quotient bits required and has variable execution time.
Signed 32 Bit Integer
Division of d0 = d0/d1, d0 >= d1
abs
eor
abs
cmp
eor
jlo
bfind
bfind
movei
move
sub
inc
sub
lsl
do
cmp
sub
rol
B-58
d2,d5
d5.l,d0.l
d2
d0.l,d3.l
d0
#32,dloop
d0
d1
d2,d1
d2,d1
ifcc
d0
d0
d5
d0
iflt
d3
dl
iflt
d1
d0,d2
d0
d1,d0
d0,d0
divdone
d0,d0
d1,d2
#32,d3
d0,d2
d2
d2,d3
d2,d1
d2.l,divloop_fast
d1,d0
d1,d0
d0
DSP96002 USER'S MANUAL
;determine final sign
;make divisor positive
;make dividend positive
;32 quotient bits
;dividend bit out, q bit in
;put in temp
;check for q bit
;update if less
;last q bit
;complement q bits
;check sign of result
;negate if needed
d1.l,d2.l
d2.l,d1.m
d0.l,d2.m
iflo
d3.l,d8.l
d0.h,d0.l
d2.h,d2.l
d2.m,d0.l
d2.l,d2.h
d3.l,d2.h
ifhs
Program
ICycles
Words
1
1
1
1
1
1
2
3
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
---
---
Totals:
13
138
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents