/* Copyright (C) 1986 by M. J. Shannon, Jr.
** Permission to distribute for non-commercial uses granted as long as this
** notice is retained.  Violators will be prosecuted.
*/

#include	"mpu.h"

/* mpu_drr():
**	wait for MPU ready to receive a command, with timeout.
*/

int
mpu_drr()
{
	long counter;
	int stat;

	for (counter = 0xFFFFL; counter != 0; --counter)
	{
		if ((stat = inp(MPUP_STAT) & MPUPS_DRR) == 0)
			break;
	}
	return (stat);
}
