?? new_mkconf.c
字號:
/* * UNIX/v7m make configuration program (mkconf.c). * Creates the files l.s, locore vectors and c.c, * configuration table. * Vector addreses are assigned according to the fixed * and floating vector rules, if non standard * vectors exist the l.s file must be edited after the * mkconf program has been run. * * Added rk06 & rk07 support. * Added rm02/3 & ts11 support. * Added A. P. Stettner's rl11 modificatons. * Added dz11 support. * Added improved core dump code, * uses unibus map (if requried) to * insure that all of memory is dumpped. * Added "ov" declaration for overlay kernel. * Added "nsid" declaration for no separate I/D space CPU. * Added "nfp" declaration for excluding floating point support code. * Added "|" for rx|rx2 and hs|ml. * Added automatic configuration of the text * overlay segments for the overlay kernel. * Added "dump" declaration to select core dump tape * and optionally specify dump tape CSR address. * * Fred Canter 8/20/81 * ******************************************************** * * * The TS11 vector is assigned to location 050, in * * order that the TS11 can function on a system which * * also has a TM11, see comments at the head of the * * TS11 driver "/sys/dev/ts.c" for an explaination. * * * * The startup code copies the TS11 vector from 050 to * * 0224 or 0260 depending on the configuration. * * * ******************************************************** */#include <stdio.h>#define HT 01#define TM 02#define TS 03#define CHAR 01#define BLOCK 02#define INTR 04#define EVEN 010#define KL 020#define ROOT 040#define SWAP 0100#define PIPE 0200char *btab[] ={ "rk", "rp", "rf", "tm", "tc", "hs|ml", "hp", "ht", "rl", "hk", "ts", "rx|rx2", "hm", 0};char *ctab[] ={ "console", "pc", "lp", "dc", "dh", "dp", "dj", "dn", "mem", "rk", "rf", "rp", "tm", "hs|ml", "hp", "ht", "du", "tty", "rl", "hk", "ts", "dz", "rx2", "hm", 0};struct tab{ char *name; int count; int address; int key; char *codea; char *codeb; char *codec; char *coded; char *codee; char *codef; char *codeg;} table[] ={ "ts", 0, 50, BLOCK+CHAR+INTR, " tsio; br5\n", ".globl _tsintr\n", "tsio: jsr r0,call; jmp _tsintr\n", " tsopen, tsclose, tsstrategy, &tstab,", " tsopen, tsclose, tsread, tswrite, nodev, nulldev, 0,", "int tsopen(), tsclose(), tsstrategy();\nstruct buf tstab;", "int tsread(), tswrite();", "console", -1, 60, CHAR+INTR+KL, " klin; br4\n klou; br4\n", ".globl _klrint\nklin: jsr r0,call; jmp _klrint\n", ".globl _klxint\nklou: jsr r0,call; jmp _klxint\n", "", " klopen, klclose, klread, klwrite, klioctl, nulldev, 0,", "", "int klopen(), klclose(), klread(), klwrite(), klioctl();", "mem", -1, 300, CHAR, "", "", "", "", " nulldev, nulldev, mmread, mmwrite, nodev, nulldev, 0, ", "", "int mmread(), mmwrite();", "pc", 0, 70, CHAR+INTR, " pcin; br4\n pcou; br4\n", ".globl _pcrint\npcin: jsr r0,call; jmp _pcrint\n", ".globl _pcpint\npcou: jsr r0,call; jmp _pcpint\n", "", " pcopen, pcclose, pcread, pcwrite, nodev, nulldev, 0, ", "", "int pcopen(), pcclose(), pcread(), pcwrite();", "clock", -2, 100, INTR, " kwlp; br6\n", ".globl _clock\n", "kwlp: jsr r0,call; jmp _clock\n", "", "", "", "", "parity", -1, 114, INTR, " trap; br7+10. / 11/70 parity\n", "", "", "", "", "", "",/* * 110 unused * 114 memory parity * 120 XY plotter * 124 DR11-B * 130 AD01 * 134 AFC11 * 140 AA11 * 144 AA11 */ "hm", 0, 150, BLOCK+CHAR+INTR, " hmio; br5\n", ".globl _hmintr\n", "hmio: jsr r0,call; jmp _hmintr\n", " nulldev, nulldev, hmstrategy, &hmtab,", " nulldev, nulldev, hmread, hmwrite, nodev, nulldev, 0,", "int hmstrategy();\nstruct buf hmtab;", "int hmread(), hmwrite();",/* * 154 unused */ "rl", 0, 160, BLOCK+CHAR+INTR, " rlio; br5\n", ".globl _rlintr\n", "rlio: jsr r0,call; jmp _rlintr\n", " nulldev, nulldev, rlstrategy, &rltab,", " nulldev, nulldev, rlread, rlwrite, nodev, nulldev, 0,", "int rlstrategy();\nstruct buf rltab;", "int rlread(), rlwrite();",/* * 164-174 unused */ "lp", 0, 200, CHAR+INTR, " lpou; br4\n", "", ".globl _lpintr\nlpou: jsr r0,call; jmp _lpintr\n", "", " lpopen, lpclose, nodev, lpwrite, nodev, nulldev, 0,", "", "int lpopen(), lpclose(), lpwrite();", "rf", 0, 204, BLOCK+CHAR+INTR, " rfio; br5\n", ".globl _rfintr\n", "rfio: jsr r0,call; jmp _rfintr\n", " nulldev, nulldev, rfstrategy, &rftab, ", " nulldev, nulldev, rfread, rfwrite, nodev, nulldev, 0,", "int rfstrategy();\nstruct buf rftab;", "int rfread(), rfwrite();", "hs", 0, 204, BLOCK+CHAR+INTR, " hsio; br5\n", ".globl _hsintr\n", "hsio: jsr r0,call; jmp _hsintr\n", " nulldev, nulldev, hsstrategy, &hstab, ", " nulldev, nulldev, hsread, hswrite, nodev, nulldev, 0,", "int hsstrategy();\nstruct buf hstab;", "int hsread(), hswrite();", "ml", 0, 204, BLOCK+CHAR+INTR, " mlio; br5\n", ".globl _mlintr\n", "mlio: jsr r0,call; jmp _mlintr\n", " nulldev, nulldev, mlstrategy, &mltab, ", " nulldev, nulldev, mlread, mlwrite, nodev, nulldev, 0,", "int mlstrategy();\nstruct buf mltab;", "int mlread(), mlwrite();",/* * 210 RC */ "hk", 0, 210, BLOCK+CHAR+INTR, " hkio; br5\n", ".globl _hkintr\n", "hkio: jsr r0,call; jmp _hkintr\n", " nulldev, nulldev, hkstrategy, &hktab,", " nulldev, nulldev, hkread, hkwrite, nodev, nulldev, 0,", "int hkstrategy();\nstruct buf hktab;", "int hkread(), hkwrite();", "tc", 0, 214, BLOCK+INTR, " tcio; br6\n", ".globl _tcintr\n", "tcio: jsr r0,call; jmp _tcintr\n", " nulldev, tcclose, tcstrategy, &tctab,", "", "int tcstrategy(), tcclose();\nstruct buf tctab;", "", "rk", 0, 220, BLOCK+CHAR+INTR, " rkio; br5\n", ".globl _rkintr\n", "rkio: jsr r0,call; jmp _rkintr\n", " nulldev, nulldev, rkstrategy, &rktab,", " nulldev, nulldev, rkread, rkwrite, nodev, nulldev, 0,", "int rkstrategy();\nstruct buf rktab;", "int rkread(), rkwrite();", "tm", 0, 224, BLOCK+CHAR+INTR, " tmio; br5\n", ".globl _tmintr\n", "tmio: jsr r0,call; jmp _tmintr\n", " tmopen, tmclose, tmstrategy, &tmtab, ", " tmopen, tmclose, tmread, tmwrite, nodev, nulldev, 0,", "int tmopen(), tmclose(), tmstrategy();\nstruct buf tmtab;", "int tmread(), tmwrite();", "ht", 0, 224, BLOCK+CHAR+INTR, " htio; br5\n", ".globl _htintr\n", "htio: jsr r0,call; jmp _htintr\n", " htopen, htclose, htstrategy, &httab,", " htopen, htclose, htread, htwrite, nodev, nulldev, 0,", "int htopen(), htclose(), htstrategy();\nstruct buf httab;", "int htread(), htwrite();", "cr", 0, 230, CHAR+INTR, " crin; br6\n", "", ".globl _crint\ncrin: jsr r0,call; jmp _crint\n", "", " cropen, crclose, crread, nodev, nodev, nulldev, 0,", "", "int cropen(), crclose(), crread();",/* * 234 UDC11 */ "rp", 0, 254, BLOCK+CHAR+INTR, " rpio; br5\n", ".globl _rpintr\n", "rpio: jsr r0,call; jmp _rpintr\n", " nulldev, nulldev, rpstrategy, &rptab,", " nulldev, nulldev, rpread, rpwrite, nodev, nulldev, 0,", "int rpstrategy();\nstruct buf rptab;", "int rpread(), rpwrite();", "hp", 0, 254, BLOCK+CHAR+INTR, " hpio; br5\n", ".globl _hpintr\n", "hpio: jsr r0,call; jmp _hpintr\n", " nulldev, nulldev, hpstrategy, &hptab,", " nulldev, nulldev, hpread, hpwrite, nodev, nulldev, 0,", "int hpstrategy();\nstruct buf hptab;", "int hpread(), hpwrite();",/* * 260 TA11 (alt TS11) */ "rx", 0, 264, BLOCK+INTR, " rxio; br5\n", ".globl _rxintr\n", "rxio: jsr r0,call; jmp _rxintr\n", " rxopen, nulldev, rxstrategy, &rxtab,", "", "int rxopen(), rxstrategy();\nstruct buf rxtab;", "", "rx2", 0, 264, BLOCK+CHAR+INTR, " rx2io; br5\n", ".globl _rx2intr\n", "rx2io: jsr r0,call; jmp _rx2intr\n", " rx2open, nulldev, rx2strategy, &rx2tab,", " rx2open, nulldev, rx2read, rx2write, nodev, nulldev, 0,", "int rx2open(), rx2strategy();\nstruct buf rx2tab;", "int rx2read(), rx2write();", "dc", 0, 308, CHAR+INTR, " dcin; br5+%d.\n dcou; br5+%d.\n", ".globl _dcrint\ndcin: jsr r0,call; jmp _dcrint\n", ".globl _dcxint\ndcou: jsr r0,call; jmp _dcxint\n", "", " dcopen, dcclose, dcread, dcwrite, dcioctl, nulldev, dc11,", "", "int dcopen(), dcclose(), dcread(), dcwrite(), dcioctl();\nstruct tty dc11[];", "kl", 0, 308, INTR+KL, " klin; br4+%d.\n klou; br4+%d.\n", "", "", "", "", "", "", "dp", 0, 308, CHAR+INTR, " dpin; br6+%d.\n dpou; br6+%d.\n", ".globl _dprint\ndpin: jsr r0,call; jmp _dprint\n", ".globl _dpxint\ndpou: jsr r0,call; jmp _dpxint\n", "", " dpopen, dpclose, dpread, dpwrite, nodev, nulldev, 0,", "", "int dpopen(), dpclose(), dpread(), dpwrite();",/* * DM11-A */ "dn", 0, 304, CHAR+INTR, " dnou; br5+%d.\n", "", ".globl _dnint\ndnou: jsr r0,call; jmp _dnint\n", "", " dnopen, dnclose, nodev, dnwrite, nodev, nulldev, 0,", "", "int dnopen(), dnclose(), dnwrite();", "dhdm", 0, 304, INTR, " dmin; br4+%d.\n", "", ".globl _dmint\ndmin: jsr r0,call; jmp _dmint\n", "", "", "", "",/* * DR11-A+ * DR11-C+ * PA611+ * PA611+ * DT11+ * DX11+ */ "dl", 0, 308, INTR+KL, " klin; br4+%d.\n klou; br4+%d.\n", "", "", "", "", "", "",/* * DJ11 */ "dh", 0, 308, CHAR+INTR+EVEN, " dhin; br5+%d.\n dhou; br5+%d.\n", ".globl _dhrint\ndhin: jsr r0,call; jmp _dhrint\n", ".globl _dhxint\ndhou: jsr r0,call; jmp _dhxint\n", "", " dhopen, dhclose, dhread, dhwrite, dhioctl, dhstop, dh11,", "", "int dhopen(), dhclose(), dhread(), dhwrite(), dhioctl(), dhstop();\nstruct tty dh11[];",/* * GT40 * LPS+ * DQ11 * KW11-W */ "du", 0, 308, CHAR+INTR, " duin; br6+%d.\n duou; br6+%d.\n", ".globl _durint\nduin: jsr r0,call; jmp _durint\n", ".globl _duxint\nduou: jsr r0,call; jmp _duxint\n", "", " duopen, duclose, duread, duwrite, nodev, nulldev, 0,", "", "int duopen(), duclose(), duread(), duwrite();",/* * DUP11 * DV11 * LK11-A * DMC11 */ "dz", 0, 308, CHAR+INTR+EVEN, " dzin; br5+%d.\n dzou; br5+%d.\n", ".globl _dzrint\ndzin: jsr r0,call; jmp _dzrint\n", ".globl _dzxint\ndzou: jsr r0,call; jmp _dzxint\n", "", " dzopen, dzclose, dzread, dzwrite, dzioctl, nulldev, dz_tty,", "", "int dzopen(), dzclose(), dzread(), dzwrite(), dzioctl();\nstruct tty dz_tty[];", "tty", 1, 0, CHAR, "", "", "", "", " syopen, nulldev, syread, sywrite, sysioctl, nulldev, 0,", "", "int syopen(), syread(), sywrite(), sysioctl();", 0};/* * The ovtab structure describes each of the modules * used to make the overlay text segments of the * overlay kernel. * The order of appearance of the modules in this * structure is critical and must not be changed. */struct ovtab{ char *mn; /* object module name */ int mc; /* non-zero if module is configured */ /* some modules are always configured, */ /* others are keyed from COUNT */ /* field of structure "table" above */ int ovno; /* initial overlay number, */ /* may be changed later */ int mts; /* module text size in bytes */ char *mpn; /* module full path name */} ovt [] ={/* * overlay 1 * Mostly system calls, will be added to later. * Mem driver is about the only thing that * will fit. * This overlay should be as full as possible, * so as not to waste memory space. */ "pipe", 1, 1, -1, "\t../ovsys/pipe.o \\", "sys1", 1, 1, -1, "\t../ovsys/sys1.o \\", "sys2", 1, 1, -1, "\t../ovsys/sys2.o \\", "sys3", 1, 1, -1, "\t../ovsys/sys3.o \\", "sys4", 1, 1, -1, "\t../ovsys/sys4.o \\", "text", 1, 1, -1, "\t../ovsys/text.o \\",/* * overlay 2 * This overlay contains some system stuff * plus bio, will be filled in with tape drivers * and what ever else will fit. */ "acct",
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -