Motorola DSP96002 User Manual page 710

32-bit digital signal processor
Table of Contents

Advertisement

and
move
rts
rndls
sub
move
asr
and
move
rts
page
;
; MOTOROLA DSP96002 DPLIB - VERSION 1.0
;
; DP_MAC - Multiply two double precision numbers and
;
;
; Entry point:
;
; Inputs:
r0 contains the lowest address of a 4-word internal
;
;
r1 contains the lowest address of a 4-word internal
;
;
; Outputs:
r0 contains the lowest address of a 4-word internal
;
;
; Alters:
D0.L,D1.L,D2.L,D3.L,D4.L,D5.L,D6.L,D7.L,D8.L,D9.L
;
dp_mac
move
move
jsr
move
move
move
jsr
move
rts
page
;
; MOTOROLA DSP96002 DPLIB - VERSION 1.0
;
; DP_MOVE - Copy floating-point value from one address to another
;
; Entry point:
;
; Inputs:
r0 contains the lowest address of a 4-word internal
;
;
r1 contains the lowest address of a 4-word internal
;
;
; Outputs:
r0 contains the lowest address of a 4-word internal
;
;
MOTOROLA
d3,d0
d1.l,x:(r0+ls)
d0.l,x:(r0+ms)
d2,d4
x:(r0+ls),d1.l
d4.l,d0.h
d0,d3
d3,d1
d1.l,x:(r0+ls)
accumulate the sum.
dp_mac: c(r0)
extended precision number
extended precision number
extended precision number
r0,d8.l
#dptemp,r0
dp_mpy
r1,d9.l
#dptemp,r1
d8.l,r0
dp_add
d9.l,r1
dp_move:
c(r0)
extended precision number
extended precision number
extended precision number
DSP96002 USER'S MANUAL
;truncate to an integer
;store the result
;calculate # shifts, get ls
;put # shifts in .h register
;create the truncation mask
;truncate to an integer
;store the result
c(r0) + c(r1) * c(r2)
;store the r0 pointer
;get temporary pointer
;multiply (r1)*(r2)
;store the r1 pointer
;point to result
;restore the r0 pointer
;accumulate the result
;restore the r1 pointer
c(r1)
B-191

Advertisement

Table of Contents
loading

Table of Contents