/* This is a very simple terminal program for the UMAN */ main() { register long iobyte; iobyte=bios(19) & ~3; /* Get iobyte */ while (1) { iobyte |=1; bios(20,iobyte); /* Set console device to keyboard */ if (bios(2)) bios(6,(long)readcon()); /* Check for input */ iobyte &= ~3; /* Set console device to serial */ bios(20,iobyte); if (bios(2)) /* There is a character at serial */ { iobyte |=1; bios(20,iobyte); bios(4,(long)(bios(7)& 0x7f)); } } } readcon() { /* This reads the console */ register int c; c=bios(3); /* Read the keyboard */ if (c!=0x1d) return(c); /* If not CTRL ] */ exit(0); }