/* * character I/O routines for the Micro Decision * installer */ # include "bi.h" cputc (a) char a; { if (a == '\n') cpm (PUTC, '\r'); cpm (PUTC, a); } prs (a) { cputs (a); } put (a) { cputs (a); } cputs (a) register char *a; { for (; *a; a++) cputc (*a); } prn (a) { prs (itoa (a)); } char * itoa (a) { static char buf [8]; buf [itob (buf, a, 16)] = NULL; return buf; } putchar (a) { cputc (a); } getch () { static char c; c = cpm (GETC); if (c == 3) exit (); c &= 0177; c = tolower (c); return c; } getchul () { static char c; c = cpm (GETC); if (c == 3) exit (); c &= 0177; c = tolower (c); return c; } /* * fatal - print error message and quit */ fatal (a) char *a; { put (a); exit (NO); }