MOTOROLA
DSP96002 USER’S MANUAL
B-183
page
;
; MOTOROLA DSP96002 DPLIB - VERSION 1.0
;
; DPLIB2IEEE - Convert internal double precision format to a double
; precision format in d0.
;
; Entry point: dplib2ieee: d0
←
convert(c(r0))
;
; Input: r0 contains the lowest address of the 4-word internal
; extended precision number
;
; Output: The returned format is DSP96002 extended precision
; floating-point format. Typical calling sequences:
;
; jsr dplib2ieee ;convert to register format
; move d0.d,L:0 ;save as dp format
;
; jsr dplib2ieee ;convert to register format
; ftfr.s d0,d0 ;round to sp
; move d0.s,x:0 ;save as sp format
;
; jsr dplib2ieee ;convert to register format
; move d0.d,d0.ml ;convert to IEEE dp format
; move d0.ml,l:0 ;save IEEE dp format
;
; Alters: D0.L,D1.L,D0.M,D0.H
;
dplib2ieee
move x:(r0),d0.l ;get internal exponent
move #$200003fe,d1.l ;max limit for register
cmp d1,d0 #$1ffffc01,d1.l ;compare to max, get min
jhi _setinf ;too big for register, set inf
cmp d1,d0 #$1ffffc00,d1.l ;compare to min, get adjust
jlo _setzero ;return zero
sub d1,d0 x:(r0+ms),d0.m ;adjust exponent, get ms
move d0.l,d0.h ;move exponent
move x:(r0+ls),d0.l ;get ls part
_fixsign move x:(r0+sign),d1.l ;get sign
jclr #0,d1.l,_ok ;jump if bit clear
bset #31,d0.h ;set negative
_ok rts
_setinf move #$7f800000,d0.s ;get infinity
jmp _fixsign
_setzero fclr d0 ;get 0
jmp _fixsign
page
;
; MOTOROLA DSP96002 DPLIB - VERSION 1.0
;
; DP_ABS _ Absolute value of a double precision number
;
; Entry point: dp_abs: c(r0+sign)
←
0 (make the number positive);
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......