Motorola DSP96002 User Manual

Page 698

Advertising
background image

MOTOROLA

DSP96002 USER’S MANUAL

B-179

move #EMAX,d1.l ;

move d0.m,d0.l ;

cmp d1,d0 ;

jle _asml ;

ori #$09,er ;

ori #$09,ier ;

jclr #22,sr,_next ;

jset #21,sr,_posinf ;

jset #31,d0.h,_retinf ;

jmp _retlrg ;

_posinf

jclr #31,d0.h,_retinf ;

jmp _retlrg ;

_next ;

jclr #21,sr,_retinf ;

;

_retlrg move #$ffffffff,d5.m ;

move #$ffffffff,d5.l ;

move #MAX,d0.l ;

dec d0 ;

move d0.l,d5.h ;

jmp _putsgn ;

; ****** Assemble Result into IEEE Format ******

_asml move d4.l,d5.m ;

move d0.m,d0.l ;

move #EBIAS,d1.l ;

add d1,d0 ;

move d0.l,d5.h ;

jclr #31,d0.h,_done ;

bset #31,d5.h ;

; ****** Exit Routine ******

_putsgn jclr #31,d0.h,_done ;

bset #31,d5.h ;

jmp _done ;

; ****** Zero Operand Detected (or denorm in FAST mode) ******

_op2_0 depftst d6,d0,d1 ;

Advertising