 	.386
	.model	use32 small

	extrn	allerr:proc
	public	_ceil
	.data
nm	db	"ceil",0

	.code
_ceil:
	enter	4,0
	lea	ecx,[ebp+8]
	sub	edx,edx
	fnstcw	[ebp-4]
	mov	ax,[ebp-4]
	and	ah,0f3h
	or	ah,8
	mov	[ebp-2],ax
	fldcw	[ebp-2]
	fld	qword ptr [ecx]
	frndint
	fldcw	[ebp-4]
	lea	eax,[nm]
	call	allerr

	leave
	ret
	end