Motorola DSP96002 User Manual page 714

32-bit digital signal processor
Table of Contents

Advertisement

inc
add
move
move
move
clr
clr
do
lsl
rol
rol
rol
_initshift
do
lsl
rol
lsl
rol
inc
sub
subc
jcs
lsr
ror
inc
jmp
_ofl
lsr
ror
_next
lsl
rol
rol
rol
lsl
rol
rol
rol
_sqrt
lsl
rol
lsl
rol
move
move
rts
;
; MOTOROLA DSP96002 DPLIB - VERSION 1.0
;
; DP_SUB - Double precision subtraction.
;
; Entry point:
;
; Inputs:
r0 contains the lowest address of a 4-word internal
;
;
r1 contains the lowest address of a 4-word internal
MOTOROLA
d0
ifcs
d2,d1
d1.l,x:(r0)
x:(r0+ms),d7.l
x:(r0+ls),d6.l
d4
#0,d5.l
d3
#0,d2.l
d0.l,_initshift
d6
d7
d4
d5
#62,_sqrt
d2
d4.l,d0.l
d3
d5.l,d1.l
d2
d3
d2
d2,d0
d3,d1
_ofl
d3
d0.l,d4.l
d2
d1.l,d5.l
d2
_next
d3
d2
d6
d7
d4
d5
d6
d7
d4
d5
d2
d3
d2
d3
d3.l,x:(r0+ms)
d2.l,x:(r0+ls)
dp_sub:
c(r0)
extended precision number
DSP96002 USER'S MANUAL
;if odd exponent, use 2 bits
;restore exponent bias
;store it
;get ms
;get ls
;clear RR
;clear DR
;initial shift
;shift 2 bits from d7:d6 (SQR)
;to d5:d4 (RR)
;take root of SQR into DR
;(dr<<2)|1, copy rr
;set lsb
;temp=rr-(dr<<2)|1
;overflow
;shift dr back only 1 bit
;rr=temp
;root bit=1
;shift dr back only 1 bit
;root bit=0
;shift 2 bits from d7:d6 (SQR)
;to d5:d4 (RR)
;shift 2 bits from d7:d6 (SQR)
;to d5:d4 (RR)
;adjust to msb
;adjust to msb
;save ms part
;save ls part
c(r0) - c(r1)
B-195

Advertisement

Table of Contents
loading

Table of Contents