Fixed CFU implementation

This commit is contained in:
ceriel 1992-03-02 11:52:09 +00:00
parent a0acff4f4c
commit a8b2fae0da
2 changed files with 21 additions and 2 deletions

View file

@ -329,7 +329,8 @@ bigmin:
fstcw 4(bx)
wait
mov dx,4(bx)
or 4(bx),0xc00 ! truncating mode
and 4(bx),0xf3ff
or 4(bx),0x400 ! to -infinity
wait
fldcw 4(bx)
cmp 8(bx),4
@ -337,8 +338,12 @@ bigmin:
! loc 4 loc ? cfu
flds 12(bx)
fabs ! ???
fiaddl (bigmin)
fistpl 12(bx)
wait
mov ax,12(bx)
sub ax,(bigmin)
mov 12(bx),ax
1:
mov 4(bx),dx
wait
@ -348,7 +353,12 @@ bigmin:
! loc 8 loc ? cfu
fldd 12(bx)
fabs ! ???
fiaddl (bigmin)
fistpl 16(bx)
wait
mov ax,16(bx)
sub ax,(bigmin)
mov 16(bx),ax
jmp 1b
.cff4:

View file

@ -487,7 +487,8 @@ bigmin:
fstcw -2(bx)
wait
mov dx,-2(bx)
or -2(bx),0xc00 ! truncating mode
and -2(bx),0xf3ff
or -2(bx),0x400 ! to -infinity
wait
fldcw -2(bx)
wait
@ -499,8 +500,12 @@ bigmin:
wait
fabs ! ???
wait
fiaddl (bigmin)
fistpl 6(bx)
wait
mov ax,8(bx)
sub ax,(bigmin+2)
mov 8(bx),ax
cmp 2(bx),2
jne 1f
mov ax,6(bx)
@ -517,8 +522,12 @@ bigmin:
wait
fabs ! ???
wait
fiaddl (bigmin)
fistpl 10(bx)
wait
mov ax,12(bx)
sub ax,(bigmin+2)
mov 12(bx),ax
cmp 2(bx),2
jne 1b
mov ax,10(bx)