/* * cbinst - cbios install program for * Morrow Designs micro decision * * Lenny Edmondson * for Morrow Designs * * 1982 * * Micro decision utilities */ # include # define MAXTERM 100 # define NCONTROL 6 /* number of control chars. */ # define RESETDISK 13 # define NESCAPE 9 /* number of esc. seqs. */ /* * the Morrow standard set of Control and escape seq's. */ # define HOME 0x1e # define CLRSCREEN 0x1a # define CLEAR CLRSCREEN # define ALTCLEAR '*' # define CLREOS 'Y' # define CEOS CLREOS # define CLREOL 'T' # define CEOL CLREOL # define CURLEFT '\b' # define LEFT CURLEFT # define CURRIGHT 0xc # define RIGHT CURRIGHT # define CURUP 0xb # define UP CURUP # define CURDOWN 0xa # define DOWN CURDOWN # define INSLINE 'E' # define INSCHAR 'Q' # define DELLINE 'R' # define DELCHAR 'W' # define HION '(' # define HI HION # define LOW ')' # define HIOFF LOW # define LO LOW # define LEVEL 1 # define CURSOR 2 # define NSPECS 6 # define HIBYTE 0xff00 # define COLWIDTH 26 # define EXIT 0 # define GETC 1 # define PUTC 2 # define WIDTH 80 # define PUTC 2 # define NCOL 3 # define BYTEMASK 0377 # define BIOSSIZE 2560 # define BIOSREC 20 /* 20 records, 128 bytes each */ # define RECSIZE 128 # define BIOSTRACK 1 # define BIOSSTART 13 /* first rec. of BIOS */ # define BIOSEND (BIOSSTART + BIOSREC) # define DCAOFFSET 0x50 # define NORMAL 0 # define FLIPPED 1 # define ASCII 2 # define BYTE 'b' # define SECTOR 's' # define GETDISK 25 # define SETDISK 14 # define SETDRV 0x1b # define SECTRAN 0x30 # define SETTRK 0x1e # define SETSEC 0x21 # define SETDMA 0x24 # define BIORED 0x27 # define BIOWRT 0x2a # define HIGHBIT 0x8000 # define NOFILE 0xe5 # define END 0xff /* indicates the end of the map */ # define BADUSER 15 # define ATT (1 << 7) /* the attribute byte */ # define RECSIZE 128 # define K 1024 # define K16 (K * 16) # define EPR 4 # define NPOINT 8 /* * values for "code" in the xlt structure * */ # define TRANTAB 0xfe /* This is the char translate tab. */ # define ENDTAB 0xff /* This is the end of the table */ /* * Micro Decision BIOS label addresses */ # define RAMDATY 0x42 struct token { char *name, value; }; struct xlt { unsigned char code; unsigned int length; }; # define MAXCUR 6 struct dca /* direct cursor addressing */ { char start [MAXCUR], mid [MAXCUR], end [MAXCUR], esclevel, offset1, offset2, order; }; struct ctrans { char from, *to; }; struct terminal { char *name, /* name of the terminal */ **message, level; struct dca dca; /* direct cursor addressing */ struct ctrans control [NCONTROL], escape [NESCAPE]; }; struct mtab { char motor, phys, ontime, settle, srt, hut, eot, gpl, curtrack; }; char drive, /* drive on which the BIOS is found */ *biosbuf, ndrives; unsigned term, /* the index number of the terminal */ nterm; /* number of terminals */ struct terminal terminal [];