Motorola DSP96002 User Manual page 707

32-bit digital signal processor
Table of Contents

Advertisement

;
GE - greater than or equal
;
GT - greater than
;
LE - less than or equal
;
LT - less than
;
NE - not equal
;
; Alters:
D0.L,D1.L,D2.L
;
dp_cmp
move
tst
jeq
bset
_pos1
move
tst
jeq
bset
_pos2
cmp
jeq
rts
_same1
move
move
cmp
jeq
rts
_same2
move
move
cmp
rts
;
; MOTOROLA DSP96002 DPLIB - VERSION 1.0
;
;DP_COPYS-Copy sign from one double precision number 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
;
;
; Alters:
D0.L
;
dp_copys move
tst
jne
move
tst
jne
rts
notzero
move
B-188
x:(r0+sign),d0.l
d0
x:(r0),d1.l ;get exponent
_pos1
#31,d1.l
x:(r1+sign),d0.l
d0
x:(r1),d2.l ;get exponent
_pos2
#31,d2.l
d2,d1
_same1
x:(r0+ms),d1.l
x:(r1+ms),d2.l
d2,d1
_same2
x:(r0+ls),d1.l
x:(r1+ls),d2.l
d2,d1
dp_copys:
c(r0+sign)
extended precision number
extended precision number
extended precision number
x:(r0+ms),d0.l
d0
notzero
x:(r0+ls),d0.l
d0
notzero
x:(r1+sign),d0.l
DSP96002 USER'S MANUAL
N eor V = 0
Z + (N eor V) = 0
Z + (N eor V) = 1
N eor V = 1
Z = 0
;get sign
;positive
;set sign bit
;get sign
;positive
;set sign bit
;compare signs and exponents
;more if same
;conditions are set
;get ms parts
;compare
;more if same
;conditions are set
;get ls parts
;do final compare
c(r1+sign)
;get ms
;test for zero
;if not zero, copy the sign
;get ls
;test for zero
;if not zero, copy the sign
;get sources sign
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents