 	.386
	.model	use32 small
		     
	extrn	allerr : proc

	public	_frexp
	.data
nm	db	"frexp",0

	.code

two	dw	2

_frexp:
      	push	ebp
	mov	ebp,esp
	lea	ecx,[ebp+8]
	sub	edx,edx
	fld	qword ptr [ecx]
	fxtract
	fxch	st(1)
	fld1
	faddp	st(1)
	mov	eax,[ebp+16]
	fistp	dword ptr [eax]

	fild	word ptr [two]
	fdivp	st(1)
	lea	eax,[nm]
	call	allerr
	leave
	ret
	end