*** spmult.s
* 	Single Precision Multiply
*	for Alcyon C
*
*	float spmult(f1,f2)
*	float f1,f2;
*
*	Copyright Atari Corp. 1987,1988
*
*	MDJohnson       2/15/88
***

	.include fpmacro

; spmult(x,y)
	fpinit	spmult
	fpidle			; wait for idle state
	move.w	#$4400,FPCMD		; x -> fp0
	ckcir	#$9504			; ready for single
	move.l	4(sp),FPOP		; write first op

	fpidle				; wait for idle state
	move.w	#$4423,FPCMD		; x * y -> fp0
	ckcir	#$9504			; ready for single
	move.l	8(sp),FPOP		; write second op

	fpidle				; wait for idle state
	move.w	#$6400,FPCMD		; fp0 -> single
	ckcir	#$B104			; ready for single
	move.l	FPOP,d0			; get single
	rts

