--- xinu/h/io.h 2018/04/24 17:39:02 1.1.1.1 +++ xinu/h/io.h 2018/04/24 17:39:13 1.1.1.2 @@ -1,16 +1,10 @@ /* io.h - fgetc, fputc, getchar, isbaddev, putchar */ -#include -#if defined(NDEVS) && NDEVS > 0 -#define INTVECI ((int)devveci0) /* lowest input interrupt dispatch loc */ -#define INTVECO ((int)devveco0) /* lowest output interrupt dispatch loc */ -#define DVECSIZE (INTVECO-INTVECI)/* bytes per dispatch vector-to loc */ -#else -#define INTVECI NULLPTR /* dummy definitions */ -#define INTVECO NULLPTR -#define DVECSIZE 0 -#endif +#define INTVECI inint /* input interrupt dispatch routine */ +#define INTVECO outint /* output interrupt dispatch routine */ +extern int INTVECI(); +extern int INTVECO(); struct intmap { /* device-to-interrupt routine mapping */ int (*iin)(); /* address of input interrupt routine */ @@ -24,11 +18,16 @@ extern struct intmap intmap[NDEVS]; #define isbaddev(f) ( (f)<0 || (f)>=NDEVS ) #endif -#define BADDEV -1 - /* In-line I/O procedures */ #define getchar() getc(CONSOLE) #define putchar(ch) putc(CONSOLE,(ch)) #define fgetc(unit) getc((unit)) #define fputc(unit,ch) putc((unit),(ch)) + +struct vector { + char *vproc; /* address of interrupt procedure */ + WORD vps; /* saved process status word */ +}; + +extern struct vector disptab[64];