#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>

short _basefpmask = 0x1332 ;

short _clear87(void)
{
	short work ;
	asm fnstsw	[work ];
	asm fnclex
	return work ;
}
void _control87(int mask1, int mask2)
{
	short work ;
	asm fstcw [work];
	mask1 &= mask2;
	mask2 = ~mask2;
	asm fwait
	work &= mask2;
	work = mask1 |= work ;
	asm fldcw [work]
}

void PASCAL __llfpinit(void)
{
	asm finit ;
	_control87(_basefpmask,0x1fff) ;
}