*** acos.s
* 	Double Precision Arc Cosine
*	for Alcyon C
*
*	double acos(d)
*	double d; (-1 <= d <= 1)
*
*	Copyright Atari Corp. 1987,1988
*
*	MDJohnson       2/15/88
***

	.include fpmacro

; acos(x)
	fpinit	acos
	fpidle				; wait for idle state
	move.w	#$541C,FPCMD
	ckcir	#$9608			; ready for double
	move.l	4(sp),FPOP		; write first half
	move.l	8(sp),FPOP		; write second half

	fpidle				; wait for idle state
	move.w	#$7400,FPCMD		; fp0 -> double
	ckcir	#$B208			; ready for double
	move.l	FPOP,d0
	move.l	FPOP,d1
	rts
