home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / math / modfl.s < prev    next >
Encoding:
Text File  |  1994-11-25  |  376 b   |  23 lines

  1. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  2.     .text
  3.     .globl ___modfl
  4. ___modfl:
  5.     pushl %ebp
  6.     movl %esp,%ebp
  7.     subl $4,%esp
  8.     fldt 8(%ebp)
  9.     movl 20(%ebp),%eax
  10.     fnstcw -2(%ebp)
  11.     movw -2(%ebp),%dx
  12.     orb $0x0c,%dh
  13.     movw %dx,-4(%ebp)
  14.     fldcw -4(%ebp)
  15.     fld %st(0)
  16.     frndint
  17.     fldcw -2(%ebp)
  18.     fld %st(0)
  19.     fstpt (%eax)
  20.     fsubrp %st,%st(1)
  21.     leave
  22.     ret
  23.