source: trunk/minix/lib/i386/em/em_cfu.s@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 514 bytes
RevLine 
[9]1.sect .text; .sect .rom; .sect .data; .sect .bss
2.define .cfu
3
4 .sect .text
5.cfu:
6 mov bx,sp
7 fstcw 4(bx)
8 wait
9 mov dx,4(bx)
10 or 4(bx),0xc00 ! truncating mode
11 wait
12 fldcw 4(bx)
13 cmp 8(bx),4
14 jne 2f
15 ! loc 4 loc ? cfu
16 flds 12(bx)
17 fabs ! ???
18 fiaddl (bigmin)
19 fistpl 12(bx)
20 wait
21 mov ax,12(bx)
22 sub ax,(bigmin)
23 mov 12(bx),ax
241:
25 mov 4(bx),dx
26 wait
27 fldcw 4(bx)
28 ret
292:
30 ! loc 8 loc ? cfu
31 fldd 12(bx)
32 fabs ! ???
33 fiaddl (bigmin)
34 fistpl 16(bx)
35 mov ax,16(bx)
36 sub ax,(bigmin)
37 mov 16(bx),ax
38 jmp 1b
Note: See TracBrowser for help on using the repository browser.