/*
 *	IO.C
 *
 *	Set of terminal input routines which don't block on keyboard
 *	input.  All terminal character input should come through
 *	mgetchar.  Mgetchar keeps an eye on the MIDI port and calls
 *	midiparse if anything happens on it.
 */

#include <stdio.h>
#include <osbind.h>		/* for midi.h */
#include "midi.h"

int
mgetchar()
{
	do {
		if (mididatap()) midiparse();
	} while (!kbddatap());
	return(Bconin(CON) & 0xFF);
}

/* ring the bell */
bell()
{
	Bconout(CON, 7);
}
