	.386
	.model use32 small

	public	__fpureset, __fpuclear, __fpustatus,__fpucontrol

	.code

__fpureset:
	fninit
	ret

__fpuclear:
	push	0
	fnstcw	[esp]
	pop	eax
	fnclex
	ret

__fpustatus:
	fnstsw	ax
	movzx	eax,ax
	ret

__fpucontrol:
	mov	ebx,[esp+8]
	mov	ecx,[ebp+4]
	push	0
	fnstcw	[esp]
	pop	eax
	and	cx,bx
	neg	bx
	and	ax,bx
	or	ax,cx
	push	eax
	fldcw	[esp]
	pop	eax
	leave
	ret
	end