home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d809 / smallmath.lha / SmallMath / Source / DTst.a < prev    next >
Encoding:
Text File  |  1993-01-25  |  357 b   |  33 lines

  1.     XDEF _IEEEDPTst
  2.  
  3.     SECTION code
  4.  
  5. _IEEEDPTst:
  6.     tst.l        d0
  7.     beq.b        FirstZeroPositive
  8.     bgt.b        ReturnPositive
  9.  
  10. Negative:
  11.     bclr.l        #31,d0
  12.     tst.l        d0
  13.     bne.b        ReturnNegative
  14.     tst.l        d1
  15.     beq.b        ReturnZero
  16. ReturnNegative:
  17.     moveq.l     #-1,d0
  18.     rts
  19.  
  20. FirstZeroPositive:
  21.     tst.l        d1
  22.     beq.b        ReturnZero
  23. ReturnPositive:
  24.     moveq.l     #1,d0
  25.     rts
  26.  
  27. ReturnZero:
  28.     clr.l        d0
  29.     rts
  30.  
  31.     END
  32.  
  33.