Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : FIXUDFDI.S

 
Output of file : FIXUDFDI.S contained in archive : EMXLIB8F.ZIP
/ fixudfdi.s (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes

.globl ___fixunsdfdi

.text

.align 2, 0x90

/ ldexp (1.0, 63)

LC0: .long 0x00000000
.long 0x43e00000

.align 2, 0x90

#define tmp_lo -12(%ebp)
#define tmp_hi -8(%ebp)
#define cw1 -4(%ebp)
#define cw2 -2(%ebp)
/define saved_ebp 0(%ebp)
/define ret_addr 4(%ebp)
#define x 8(%ebp)

___fixunsdfdi:
pushl %ebp
movl %esp, %ebp
subl $12, %esp
fstcw cw1
movw cw1, %ax
orw $0x0c00, %ax / truncate towards zero
movw %ax, cw2
fldcw cw2
fldl x
fcoml LC0
fstsww %ax
sahf
jb 1f
fsubl LC0
fistpq tmp_lo
addl $0x80000000, tmp_hi
jmp 2f

.align 2, 0x90
1: fistpq tmp_lo
2: movl tmp_lo, %eax
movl tmp_hi, %edx
fldcw cw1
leave
ret


  3 Responses to “Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : FIXUDFDI.S

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/