/* 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_dsr(): ** wait for MPU ready to send data, with timeout. */ int mpu_dsr() { long counter; int stat; for (counter = 0xFFFFL; counter != 0; --counter) { if ((stat = inp(MPUP_STAT) & MPUPS_DSR) == 0) break; } return (stat); }