/* * cbinst - cbios install program for * Morrow Designs micro decision * * Lenny Edmondson * for Morrow Designs * * 1982 * * Micro decision utilities */ # include # define NCONTROL 6 /* number of control chars. */ # define RESETDISK 13 # define NESCAPE 9 /* number of esc. seqs. */ # define HOME 0x1e # define CLRSCREEN 0x1a # define CLREOS 0x19 # define CLREOL 0x14 # define CURLEFT '\b' # define CURRIGHT 0xc # define CURUP 0xb # define CURDOWN 0xa # define INSLINE 5 # define INSCHAR 0x11 # define DELLINE 0x12 # define DELCHAR 0x17 # define HION 0x29 # define HIOFF 0x28 # 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 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 ~0 # 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 xlt { unsigned char code; unsigned int length; }; struct dca /* direct cursor addressing */ { char start [6], mid [6], end [6], 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;