/* external variables and definitions */ #define STND 1 /* flag for non-test board for functions */ #define TEST 0 /* flag for test board for functions */ #define SBASE 0x60 /* address of non-test board */ #define TBASE 0x48 /* address of test board */ #define SCLK SBASE+2 /* non-test clk address for all functions */ #define TCLK TBASE+2 /* test clk address for all funct. */ #define TIMRD 0x0c /* command to read time into the shift reg. */ #define TIMST 0x08 /* command to store time into the clk. */ #define SHIFT 0x04 /* command to ready shift reg. before clocking bit */ #define HOLD 0x00 /* command to hold all comm. with clk. reg. */ #define TP64 0x10 /* command to put out 64 int/sec * (gets clk. out of 'test' mode) */ #define CONIN 1 /* cp/m function number for console input */ #define CONSTAT 11 /* cp/m function number for console status */ #define CONOUT 2 /* cp/m function number for console output */ #define BUFSZ 90 /* maximum buffer size */ FIO stdout; /* external definitions */ int base; /* lowest port # for most functions */ int group; /* group # */ int functs; /* upper 6 bits of group select port */ int wrdsze; /* word size ( 5, 6, 7, 8, ) */ char stopsze; /* stop bit lenth ( 'l', 's') */ char parity; /* parity enable bit ( 'y', 'n' ) */ char eoparty; /* even or odd parity ( 'e', 'o' ) */ char dtr; /* data terminal ready ( 'y', 'n' ) */ char rts; /* request to send ( 'y', 'n' ) */ char threint; /* trans. holding reg. interrupt */ char drint; /* data ready interrupt */ char rlint; /* receive line interrupt */ char modint; /* modem interrupt */ char buff[BUFSZ]; /* buffer for output to terminal */ int baud; /* baud rate */ int abaud[]; /* array of most common baud rates */ int dbaud[]; /* holds the divisor for the baud rate */ /* in an array that matches the array */ /* above for baud rates */ /* has the addr of the function */ int (*error)(); /* that failed , cannot point to a * function that needs parameters */ int erflg; /* 0 if not in error loop, 1 if it is */ int verflg; /* 1 if not verbose,0 if verbose */ int main(); /* for nonfatal errors */ int int0(),int1(),int2(),int3(),int4(),int5(),int6(),int7(); char inted; /* 1 if int occured */ char intnum; /* interrupt number left here after int occurs */ char level; /* level or edge triggered */ char addint; /* address interval */ char single; /* single or multiple */ char icw4; /* icw4 needed */ char fulnst; /* fully nested mode */ char buffed; /* buffered or sp/en mode */ char ms; /* master/slave */ char aeoi; /* automatic end of interrupt */ unsigned char jtable[128]; /* jump table */ unsigned char *addr; /* 32 byte boundry address */