Subject: Ken's PDP-11 configurator program

From: [email-masked]
Date: Mon, 15 May 2000 03:02:14 -0400

Since the subject of old PDP-11s seems to have
hotted up again, I decided to disgorge Ken's
program for ordering PDP-11s.  It gives prices
circa 1975 in US$, and knows about various restrictions
like bus loads and what will fit in a box.  It's
another (nearly the remainder) from the DECtape archives.

The program itself is written in old C--pre K&R 1-- (beware
of the =- operators!).  It will take a bit of
work to get going.  Quite possibly extraction
of the tables is more interesting than running
the program.

	Dennis

# To unbundle, run this file
echo c1.c
sed 's/.//' >c1.c <<'//GO.SYSIN DD c1.c'
-/*
- *	code = d1d2d3d4
- *		d1 = discount
- *			0 NO
- *			1 Type 1
- *			2 Type 2
- *			3 MOD
- *			4 GT
- *		d2 = system units
- *			0-4 uses 0-4 SU
- *			5 3 extra (11/45)
- *			6 7 extra (11/40)
- *			7 6 extra (ba11-es)
- *			8 9 extra (h960)
- *		d3 = small periph slots
- *			0-4 uses 0-4
- *			5 3 extra (11/45)
- *			6 1 extra (11/40)
- *			7 4 extra (dd)
- *		d4 = loads
- *			0-4 uses 0-4
- *			5 17 extra (11/45)
- *			6 19 extra (11/40)
- *			7 18 extra (db)
- */
-int	table[]
-{					/*
-price	maint	code	name		*/
-16765,	121,	2555,	"kb11",		"11/45 CPU",
-4210,	32,	2000,	"kt11-c",	"11/45 segmentation",
-5290,	45,	2000,	"fp11-b",	"11/45 floating point",
-1950,	13,	2001,	"ms11-cc",	"Bi Polar controller",
-1950,	13,	2001,	"ms11-bc",	"1st MOS controller",
-1500,	13,	2001,	"ms11-bd",	"2nd MOS controller",
-1950,	16,	2000,	"ms11-cm",	"1K Bi Polar",
-2500,	16,	2000,	"ms11-cp",	"1K Bi Polar (parity)",
-3000,	42,	2000,	"ms11-br",	"MOS 4K memory",
-3420,	40,	2000,	"ms11-bt",	"MOS 4K memory (parity)",
-
-6245,	60,	2666,	"kd11-a",	"11/40 CPU",
-1400,	11,	2000,	"ke11-e",	"11/40 multiply/divide",
-1500,	11,	2000,	"ke11-f",	"11/40 floating point",
-2480,	21,	2000,	"kt11-d",	"11/40 segmentation",
-410,	5,	2000,	"kj11-a",	"11/40 stack limit",
-/* xx */
-810,	6,	2011,	"kg11-a",	"Cyclic check unit",
-300,	3,	2001,	"kw11-l",	"line clock",
-700,	6,	2011,	"kw11-p",	"programmable clock",
-
-4700,	37,	1201,	"mf11-l",	"8K core and controller",
-4900,	32,	1201,	"mf11-u",	"16K core and controller",
-5700,	32,	1202,	"mf11-lp",	"8K core (parity) and controller",
-6300,	27,	1202,	"mf11-up",	"16K core (parity) and controller",
-4400,	37,	1001,	"mm11-l",	"8K core",
-4500,	32,	1001,	"mm11-u",	"16K core",
-5400,	32,	1001,	"mm11-lp",	"8K core (parity)",
-5600,	27,	1001,	"mm11-up",	"16K core (parity)",
-
-400,	0,	3011,	"m792",		"16 word ROM",
-450,	3,	2011,	"bm792-ya",	"tty/paper tape bootstrap",
-450,	3,	2011,	"bm792-yb",	"disk/DECtape bootstrap",
-450,	3,	2011,	"bm792-yc",	"card reader bootstrap",
-450,	3,	2011,	"bm792-yh",	"cassette bootstrap",
-400,	2,	1011,	"bm873-ya",	"restart loader",
-700,	5,	2022,	"mr11-db",	"bulk bootstrap",
-
-5950,	27,	2001,	"rf11",		"controller",
-10700,	42,	2000,	"rs11",		".5MB fixed head disk",
-5000,	27,	1201,	"rjs",		"controller",
-9000,	48,	1000,	"rs03",		".5MB fixed head disk",
-13000,	58,	1000,	"rs04",		"1MB fixed head disk",
-5900,	42,	1101,	"rk11",		"disk controller",
-5100,	64,	1000,	"rk05-aa",	"2.5 moving head disk",
-11880,	74,	1,	"rp11",		"disk controller",
-20000,	159,	0,	"rp03-as",	"40MB moving head disk",
-
-3240,	27,	2001,	"tm11",		"tape controller",
-7505,	74,	2000,	"tu10-ee",	"9-chan tape drive",
-7505,	74,	2000,	"tu10-fe",	"7-chan tape drive",
-4400,	13,	2001,	"tc11",		"DECtape controller",
-5100,	32,	2000,	"tu56",		"DECtape drive",
-2990,	38,	2011,	"ta11-aa",	"Dual Cassette",
-
-5615,	58,	11,	"ls11-a",	"60LPM 132col 64char printer",
-11770,	53,	11,	"lv11-ba",	"500LPM 132col 96char printer/plotter",
-/* xx */
-12000,	60,	11,	"lp11-fa",	"300LPM 80col 64char printer",
-/* xx */
-13500,	65,	11,	"lp11-ha",	"300LPM 80col 96char printer",
-/* xx */
-17500,	75,	11,	"lp11-ja",	"300LPM 132col 64char printer",
-/* xx */
-19000,	80,	11,	"lp11-ka",	"300LPM 132col 96char printer",
-30000,	154,	11,	"lp11-ra",	"1200LPM 132col 64char printer",
-33000,	154,	11,	"lp11-sa",	"800LPM 132col 96char printer",
-9900,	72,	11,	"lp11-va",	"300LPM 132col 64char printer",
-11900,	72,	11,	"lp11-wa",	"230LPM 132col 96char printer",
-
-4860,	53,	11,	"cr11",		"300CPM 80col reader",
-5290,	53,	11,	"cm11-fa",	"200CPM 40col reader",
-10800,	74,	101,	"cd11-a",	"1000CPM 80col reader",
-15120,	95,	101,	"cd11-ea",	"1200CPM 80col reader",
-2400,	22,	2011,	"pr11",		"300CPS reader",
-3900,	38,	2011,	"pc11",		"300CPS reader 50CPS punch",
-
-2795,	32,	2000,	"la30-pa",	"DEC writer (parallel)",
-3195,	32,	2000,	"la30-ca",	"DEC writer (serial)",
-3195,	32,	2000,	"la30-ea",	"DEC writer (EIA)",
-1850,	37,	0,	"lt33-dc",	"Teletype 33 (ASR)",
-1400,	32,	0,	"lt33-cc",	"Teletype 33 (KSR)",
-4860,	32,	0,	"lt35-dc",	"Teletype 35 (ARS)",
-3240,	29,	0,	"lt35-cc",	"Teletype 35 (KSR)",
-2795,	23,	2000,	"vt05b-aa",	"Display (64 char)",
-2795,	23,	2000,	"vt05b-ba",	"Display (96 char)",
-2795,	23,	2000,	"vt05b-ca",	"Display (64 char EIA)",
-2795,	23,	2000,	"vt05b-da",	"Display (96 char EIA)",
-
-500,	6,	2011,	"lc11-a",	"DEC writer interface",
-500,	6,	2011,	"dl11-a",	"Teletype interface (20ma)",
-500,	6,	2011,	"dl11-c",	"Teletype interface(20ma)",
-525,	6,	2011,	"dl11-b",	"Teletype interface (EIA)",
-525,	6,	2011,	"dl11-d",	"Teletype interface (EIA)",
-550,	6,	2011,	"dl11-e",	"Teletype interface (EIA+ctrl)",
-
-13400,	135,	4000,	"gt40-aa",	"Graphics scope",
-14620,	162,	4000,	"gt40-ac",	"Graphics scope+ASR33",
-15695,	162,	4000,	"gt40-ae",	"Graphics scope+LA30",
-
-1080,	6,	2101,	"aa11-da",	"D to A",
-405,	5,	2000,	"ba614",	"D to A",
-3240,	75,	0,	"vt01-a",	"Tek 611",
-1080,	14,	0,	"vr01-a",	"Point scope",
-3240,	18,	0,	"vr14",		"Point scope",
-
-4400,	30,	2021,	"dh11-aa",	"Async multiplexer",
-4400,	30,	2021,	"dh11-ab",	"Async multiplexer",
-170,	5,	2000,	"dm11-da",	"line adapter",
-485,	10,	2000,	"dm11-db",	"line adapter (EIA)",
-1295,	18,	2001,	"dm11-bb",	"modem control",
-860,	5,	2000,	"dm11-dc",	"line adapter for control",
-3400,	30,	1101,	"dj11-aa",	"Async multiplexer",
-3100,	25,	1101,	"dj11-ab",	"Async multiplexer",
-3200,	30,	1101,	"dj11-ac",	"Async multiplexer",
-100,	0,	3000,	"m405",		"speed card",
-270,	3,	2100,	"dc11-aa",	"Async SU",
-270,	3,	2100,	"dc11-ab",	"Async SU",
-270,	3,	2100,	"dc11-ac",	"Async SU",
-375,	3,	2100,	"dc11-ad",	"Async SU",
-375,	3,	2100,	"dc11-ae",	"Async SU",
-270,	3,	2100,	"dc11-ag",	"Async SU",
-270,	3,	2100,	"dc11-ah",	"Async SU",
-375,	3,	2100,	"dc11-ax",	"Async SU",
-645,	7,	2001,	"dc11-da",	"port",
-1510,	18,	2101,	"dp11-da",	"Sync interface (201)",
-1940,	18,	2101,	"dp11-dc",	"Sync interface (303)",
-320,	3,	2000,	"dp11-ca",	"12 bit extender",
-215,	3,	2000,	"dp11-ka",	"clock",
-900,	5,	2011,	"du11-da",	"Sync interface",
-2800,	23,	2101,	"dq11-da",	"Sync interface",
-4200,	24,	2101,	"dq11-ea",	"Sync interface",
-150,	1,	2000,	"dq11-ka",	"clock",
-320,	5,	2100,	"dn11-aa",	"ACU interface",
-430,	5,	2001,	"dn11-da",	"ACU driver",
-
-430,	5,	2011,	"dr11-c",	"word interface",
-1290,	12,	2101,	"dr11-b",	"dma channel",
-
-185,	0,	2170,	"dd11-b",	"Small Periph mount",
-1080,	5,	2107,	"db11-a",	"Bus repeater",
-2400,	15,	2800,	"h960-da",	"Extension box and cabinet",
-2100,	5,	2800,	"ba11-fd",	"Extension box",
-400,	0,	2700,	"ba11-es",	"Extension box",
-
-5000,	0,	2000,	"qj580-ac",	"rsx-11d on DECtape",
-5000,	0,	2000,	"qj580-ad",	"rsx-11d on 9-track",
-5000,	0,	2000,	"qj580-af",	"rsx-11d on 7-track",
-5000,	0,	2000,	"qj580-ae",	"rsx-11d on disk cartridge",
-100,	0,	2000,	"qj580-gz",	"rsx-11d manuals",
-4000,	0,	2000,	"qr430-ac",	"rsts-e on DECtape",
-4000,	0,	2000,	"qr430-ad",	"rsts-e on 9-track",
-4000,	0,	2000,	"qr430-ae",	"rsts-e on disk cartridge",
-4000,	0,	2000,	"qr430-af",	"rsts-e on 7-track",
-1700,	0,	2000,	"qj250-ac",	"dos/batch on DECtape",
-1700,	0,	2000,	"qj250-ad",	"dos/batch on 9-track",
-1700,	0,	2000,	"qj250-af",	"dos/batch on 7-track",
-1700,	0,	2000,	"qj250-ae",	"dos/batch on disk cartridge",
-12,	0,	2000,	"qj250-am",	"batch manuals",
-60,	0,	2000,	"qj220-am",	"dos manuals",
-
-1,	0,	0,	"conf",		"",
-1,	0,	0,	"preq",		"",
-1,	0,	0,	"item",		"",
-1,	0,	0,	"list",		"",
-1,	0,	0,	"xxmm",		"",
-1,	0,	0,	"xxdh",		"",
-1,	0,	0,	"xxtc",		"",
-0
-};
//GO.SYSIN DD c1.c
echo c2.c
sed 's/.//' >c2.c <<'//GO.SYSIN DD c2.c'
-int	preq[]
-{
-"kt11-c",	"kb11",		1,
-"fp11-b",	"kb11",		1,
-"ms11-br",	"ms11-bc",	4,
-"ms11-bt",	"ms11-bc",	4,
-"ms11-cm",	"ms11-bd",	4,
-"ms11-cp",	"ms11-bd",	4,
-"ms11-bc",	"kb11",		2,
-"ms11-bd",	"kb11",		2,
-
-"ke11-f",	"ke11-e",	1,
-"kt11-d",	"kd11-a",	1,
-
-"mm11-l",	"mf11-l",	2,
-"mm11-lp",	"mf11-lp",	2,
-"xxmm",		"mm11-l",	12,
-
-"rs11",		"rf11",		8,
-"rk05-aa",	"rk11",		8,
-"rp03-as",	"rp11",		8,
-
-"tu10-ee",	"tm11",		8,
-"tu10-fe",	"tm11",		8,
-"tu56",		"tc11",		4,
-"xxtc",		"tu56",		2,
-
-"la30-pa",	"lc11-a",	1,
-"la30-ca",	"dl11-a",	1,
-"lt33-dc",	"dl11-a",	1,
-"lt33-cc",	"dl11-a",	1,
-"lt35-dc",	"dl11-a",	1,
-"lt35-cc",	"dl11-a",	1,
-"vt05b-aa",	"dl11-a",	1,
-"vt05b-ba",	"dl11-a",	1,
-"vt05b-ca",	"dl11-a",	1,
-"vt05b-da",	"dl11-a",	1,
-
-"vt01-a",	"ba614",	1,
-"vr01-a",	"ba614",	1,
-"vr14",		"ba614",	1,
-"ba614",	"aa11-da",	4,
-
-"dm11-da",	"dh11-aa",	4,
-"dm11-db",	"dh11-aa",	4,
-"dm11-bb",	"dh11-aa",	1,
-"dm11-dc",	"dm11-bb",	4,
-"xxdh",		"dm11-dc",	4,
-"m405",		"dh11-aa",	2,
-
-"dc11-da",	"dc11-aa",	2,
-
-"dp11-ca",	"dp11-da",	1,
-"dp11-ka",	"dp11-da",	1,
-"dn11-da",	"dn11-aa",	4,
-
-0
-};
//GO.SYSIN DD c2.c
echo c3.c
sed 's/.//' >c3.c <<'//GO.SYSIN DD c3.c'
-char	*pkg[]
-{
-
-/*
- * useful synonyms
- */
-
-"/45",		"kb11",		0,
-"/40",		"kd11-a",	0,
-"dl",		"dl11-a",	0,
-"kl",		"dl11-a",	0,
-"dl11",		"dl11-a",	0,
-"dd",		"dd11-b",	0,
-"dd11",		"dd11-b",	0,
-"db",		"db11-a",	0,
-"db11",		"db11-a",	0,
-"rom",		"m792",		0,
-"aa11-d",	"aa11-da",	0,
-"aa11",		"aa11-da",	0,
-"vt01",		"vt01-a",	0,
-"vt",		"vt01-a",	0,
-"vt05",		"vt05b-aa",	0,
-"vr01",		"vr01-a",	0,
-"rk05",		"rk05-aa",	0,
-"rk",		"rk05-aa",	0,
-"tc",		"xxtc",		0,
-"rk11",		"rk11-ca",	0,
-"dc",		"dc11-da",	0,
-"rp",		"rp03",		0,
-"rf",		"rs11",		0,
-"tm",		"tu10",		0,
-"pc",		"pc11",		0,
-"kw",		"kw11-l",	0,
-"dn",		"dn11-da",	0,
-"dr11",		"dr11-c",	0,
-"box",		"h960-da",	0,
-"dh",		"xxdh",		0,
-"mm",		"xxmm",		0,
-"la30",		"la30-ca",	0,
-"rp03",		"rp03-as",	0,
-"tu10",		"tu10-ee",	0,
-"bulk",		"mr11-db",	0,
-"clock",	"kw11-l",	0,
-
-/*
- * packages
- */
-
-"rf11-aa",
-	"rf11",
-	"rs11",
-	0,
-"rk11-de",
-	"rk11",
-	"rk05",
-	0,
-"rp11-ce",
-	"rp11",
-	"rp03",
-	0,
-"tc11-ga",
-	"tc11",
-	"tu56",
-	0,
-"tm11-ea",
-	"tm11",
-	"tu10",
-	0,
-"tm11-fa",
-	"tm11",
-	"tu10-fe",
-	0,
-"core-16kp",
-	"mf11-up",
-	0,
-"core-32kp",
-	"mf11-up",
-	"mm11-up",
-	0,
-"mos-16kp",
-	"ms11-bc",
-	"ms11-bt",
-	"ms11-bt",
-	"ms11-bt",
-	"ms11-bt",
-	0,
-"/45-cu",
-	"/45",
-	"clock",
-	"core-16kp",
-	"bulk",
-	"dl11",
-	"la30",
-	0,
-"/45-cw",
-	"/45",
-	"kt11-c",
-	"clock",
-	"core-32kp",
-	"bulk",
-	"dl11",
-	"la30",
-	0,
-"/50-cu",
-	"/45",
-	"mos-16kp",
-	"clock",
-	"bulk",
-	"dl11",
-	"la30",
-	0,
-"/50-cw",
-	"/45",
-	"kt11-c",
-	"clock",
-	"mos-16kp",
-	"core-16kp",
-	"bulk",
-	"dl11",
-	"la30",
-	0,
-"/45-rp",
-	"/45-cw",
-	"mf11-up",
-	"rf11-aa",
-	"rk11-de",
-	"tc11-ga",
-	"h960-da",
-	"qr430-ac",
-	0,
-"/50-rp",
-	"/50-cw",
-	"mm11-up",
-	"rf11-aa",
-	"rk11-de",
-	"tc11-ga",
-	"h960-da",
-	"qr430-ac",
-	0,
-"/45-rs",
-	"/45-cw",
-	"mf11-up",
-	"rf11-aa",
-	"rk11-de",
-	"tm11-ea",
-	"h960-da",
-	"qr430-ad",
-	0,
-"/50-rs",
-	"/50-cw",
-	"mm11-up",
-	"rf11-aa",
-	"rk11-de",
-	"tm11-ea",
-	"h960-da",
-	"qr430-ad",
-	0,
-"/45-ru",
-	"/45-cw",
-	"mf11-up",
-	"fp11-b",
-	"rp11-ce",
-	"tm11-ea",
-	"h960-da",
-	"qr430-ad",
-	0,
-"/50-ru",
-	"/50-cw",
-	"mm11-up",
-	"fp11-b",
-	"rp11-ce",
-	"tm11-ea",
-	"h960-da",
-	"qr430-ad",
-	0,
-"/45-ps",
-	"/45-cu",
-	"rk11-de",
-	"tm11-ea",
-	"qj250-ad",
-	0,
-"/50-ps",
-	"/50-cu",
-	"rk11-de",
-	"tm11-ea",
-	"qj250-ad",
-	0,
-"/45-pu",
-	"/45-cu",
-	"rf11-aa",
-	"tc11-ga",
-	"qj250-ac",
-	0,
-"/50-pu",
-	"/50-cu",
-	"rf11-aa",
-	"tc11-ga",
-	"qj250-ac",
-	0,
-"/50-pw",
-	"/50-cu",
-	"ms11-bd",
-	"ms11-bt",
-	"ms11-bt",
-	"fp11-b",
-	"rp11-ce",
-	"tm11-ea",
-	"cd11-ea",
-	"lp11-ra",
-	"dd11",
-	"qj250-ad",
-	0,
-"/45-na",
-	"/45-cw",
-	"rk11-de",
-	"tm11-ea",
-	"qj580-ad",
-	0,
-"/50-na",
-	"/50-cw",
-	"rk11-de",
-	"tm11-ea",
-	"qj580-ad",
-	0,
-"/45-nc",
-	"/45-cw",
-	"mf11-up",
-	"rk11-de",
-	"tm11-ea",
-	"h960-da",
-	"qj580-ad",
-	0,
-"/50-nc",
-	"/50-cw",
-	"mm11-up",
-	"rk11-de",
-	"tm11-ea",
-	"qj580-ad",
-	0,
-"/45-nh",
-	"/45-cw",
-	"mf11-up",
-	"rk11-de",
-	"rk05",
-	"h960-da",
-	"qj580-ae",
-	0,
-"/50-nh",
-	"/50-cw",
-	"mm11-up",
-	"rk11-de",
-	"rk05",
-	"qj580-ae",
-	0,
-"/45-ne",
-	"/45-cw",
-	"core-32kp",
-	"rp11-ce",
-	"tm11-ea",
-	"cr11",
-	"lp11-ja",
-	"dd11",
-	"h960-da",
-	"qj580-ad",
-	0,
-"/50-ne",
-	"/50-cw",
-	"core-32kp",
-	"rp11-ce",
-	"tm11-ea",
-	"cd11-ea",
-	"lp11-ra",
-	"dd11",
-	"h960-da",
-	"qj580-ad",
-	0,
-0
-};
//GO.SYSIN DD c3.c
echo m.c
sed 's/.//' >m.c <<'//GO.SYSIN DD m.c'
-int	nsu;
-int	nspc;
-int	nld;
-double	fprice;
-double	fmaint;
-double	fdisc[10];
-char	*ndisc[10]
-{
-	"None  ",
-	"Type 1",
-	"Type 2",
-	"Module",
-	"GT 40 ",
-	0,
-};
-char	item[400];
-struct
-{
-	char	*name1;
-	char	*name2;
-	int	count;
-} preq[];
-struct
-{
-	int price;
-	int maint;
-	int code;
-	char *name;
-	char *descr;
-} table[];
-char	*pkg[];
-int	fin;
-char	buf[100];
-
-main(argc, argv)
-char *argv[];
-{
-	int i, c, n;
-	int flag;
-	double fmul();
-
-	fprice = 0.;
-	fmaint = 0.;
-	nsu = 0;
-	nspc = 0;
-	nld = 0;
-
-	for(i=1; i<argc; i++) {
-		if(argv[i][0] == '-') {
-			if(compos(1, argv[i]+1))
-				printf("%s: bad arg\n", argv[i]+1);
-			continue;
-		}
-		fin = open(argv[i], 0);
-		if(fin < 0) {
-			printf("%s: cannot open\n", argv[i]);
-			exit();
-		}
-	}
-
-loop:
-
-	/*
-	 * read in quantity
-	 * ignore space and tab
-	 */
-
-	n = 1;
-	c = getchar();
-	while(c==' ' || c=='	')
-		c = getchar();
-	if(c>='0' && c<='9') {
-		n = 0;
-		while(c>='0' && c<='9') {
-			n = n*10 + c-'0';
-			c = getchar();
-		}
-	}
-
-	/*
-	 * read up to item name
-	 */
-
-	while(c==' ' || c=='	')
-		c = getchar();
-
-	/*
-	 * read in item name
-	 * terminate with null
-	 */
-
-	for(i=0; i<99; i++) {
-		if(c == '\n')
-			break;
-		if(c == '\0')
-			goto pass2;
-		buf[i] = c;
-		c = getchar();
-	}
-
-	/*
-	 * ignore blank lines
-	 */
-
-	if(i == 0)
-		goto loop;
-	buf[i] = '\0';
-	if(compos(n, buf))
-		printf("%s: cannot recognize\n", buf);
-	goto loop;
-
-pass2:
-
-	/*
-	 * examine for contigencies
-	 */
-
-	flag = 0;
-	i = lookup("preq");
-	if(item[i])
-	for(i=0; preq[i].name1 != 0; i++) {
-		c = lookup(preq[i].name1);
-		if(c < 0)
-			goto badpreq;
-		n = preq[i].count;
-		n = (item[c] + n - 1)/n;
-		if(n <= 0)
-			continue;
-		c = lookup(preq[i].name2);
-		if(c < 0) {
-		badpreq:
-			printf("bad preq table:\n\t%s\n", preq[i].name1);
-			continue;
-		}
-		n =- item[c];
-		if(n > 0) {
-			if(compos(n, preq[i].name2))
-					printf("%s: bad preq\n", preq[i].name2);
-			flag++;
-		}
-	}
-	if(flag)
-		goto pass2;
-
-	/*
-	 * clean up system units,
-	 * spc's, and loads
-	 */
-
-	i = lookup("conf");
-	if(item[i]) {
-		while(nspc < 0)
-			if(compos(1, "dd11-b")) {
-				printf("no dd-11\n");
-				break;
-			}
-		while(nld < 0)
-			if(compos(1, "db11-a")) {
-				printf("no db-11\n");
-				break;
-			}
-		while(nsu < 0) {
-			if(compos(1, "h960-da")) {
-				printf("no h-960\n");
-				break;
-			}
-			if(nsu < 0 && compos(1, "ba11-f"))
-				printf("no ba11\n");
-		}
-	}
-
-	/*
-	 * print pretty table
-	 */
-
-pass3:
-	i = lookup("list");
-	flag = item[i];
-	i = lookup("item");
-	if(flag || item[i]) {
-		for(i=0; i<200; i++)
-		if(item[i]!=0 && table[i].price!=1) {
-			n = item[i];
-			printf("%2d %-8s", n, table[i].name);
-			printf("%4.0f", fmul(n, table[i].maint));
-			printf("%8.0f", fmul(n, table[i].price));
-			if(flag)
-				printf(" %s", table[i].descr);
-			printf("\n");
-		}
-		printf("          ");
-	}
-	printf("%5.0f%8.0f\n", fmaint, fprice);
-	printf("\nnsu = %4d\nspc = %4d\nnld = %4d\n\n",
-		nsu, nspc, nld);
-	for(i=0; ndisc[i]; i++)
-		printf("%s%8.0f\n", ndisc[i], fdisc[i]);
-}
-
-compos(n, bp)
-char *bp;
-{
-	int i, p[4], d, j;
-	double fmul();
-
-	i = lookup(bp);
-	if(i >= 0)
-		goto found;
-
-	/*
-	 * look up in package table
-	 */
-
-	for(i=0; pkg[i]; i++) {
-		d = 0;
-		if(equal(pkg[i], bp))
-			d++;
-		for(i++; pkg[i]; i++)
-			if(d && compos(n, pkg[i]))
-				printf("%s: bad pkg\n", pkg[i]);
-		if(d)
-			return(0);
-	}
-	return(1);
-
-found:
-	item[i] =+ n;
-	if(table[i].price == 1)
-		return(0);
-	d = table[i].code;
-	for(j=0; j<4; j++) {
-		p[j] = d%10;
-		d =/ 10;
-	}
-	fmaint =+ fmul(n, table[i].maint);
-	fprice =+ fmul(n, table[i].price);
-	switch(p[0]) {
-	case 5:
-		p[0] = -17;
-		break;
-
-	case 6:
-		p[0] = -19;
-		break;
-
-	case 7:
-		p[0] = -18;
-		break;
-	}
-	nld =- p[0]*n;
-	switch(p[1]) {
-
-	case 5:
-		p[1] = -3;
-		break;
-
-	case 6:
-		p[1] = -1;
-		break;
-
-	case 7:
-		p[1] = -4;
-		break;
-	}
-	nspc =- p[1]*n;
-	switch(p[2]) {
-
-	case 5:
-		p[2] = -3;
-		break;
-
-	case 6:
-		p[2] = -7;
-		break;
-
-	case 7:
-		p[2] = -6;
-		break;
-
-	case 8:
-		p[2] = -9;
-		break;
-
-	case 9:
-		p[2] = -18;
-		break;
-	}
-	nsu =- p[2]*n;
-	fdisc[p[3]] =+ fmul(n, table[i].price);
-	return(0);
-}
-
-double fmul(n, p)
-{
-	double f;
-
-	f = p;
-	if(f < 0.)
-		f =+ 65536.;
-	f =* n;
-	return(f);
-}
-
-lookup(bp)
-char *bp;
-{
-	int i;
-
-	for(i=0; table[i].price!=0; i++)
-	if(equal(table[i].name, bp))
-		return(i);
-	return(-1);
-}
-
-equal(s1, s2)
-char *s1, *s2;
-{
-	register char *c1, *c2;
-
-	c1 = s1;
-	c2 = s2;
-	while(*c1++ == *c2)
-		if(*c2++ == '\0')
-			return(1);
-	return(0);
-}
//GO.SYSIN DD m.c
echo min40.cf
sed 's/.//' >min40.cf <<'//GO.SYSIN DD min40.cf'
-1	kd11-a
-1	ke11-e
-1	kt11-d
-1	kw11-l
-1	mf11-u
-1	mm11-u
-1	rk11
-1	rk05
-1	lt33-dc
-1	dl11-a
//GO.SYSIN DD min40.cf
echo min45.cf
sed 's/.//' >min45.cf <<'//GO.SYSIN DD min45.cf'
-1	kb11
-1	kt11-c
-1	kw11-l
-1	mf11-u
-1	mm11-u
-1	rk11
-1	rk05
-1	lt33-dc
-1	dl11-a
//GO.SYSIN DD min45.cf
echo rc
sed 's/.//' >rc <<'//GO.SYSIN DD rc'
-conf -list -/45-cu </dev/null
-conf -list -/50-cu </dev/null
-conf -list -/45-cw </dev/null
-conf -list -/50-cw </dev/null
-conf -list -/45-na </dev/null
-conf -list -/50-na </dev/null
-conf -list -/45-nc </dev/null
-conf -list -/50-nc </dev/null
-conf -list -/45-ne </dev/null
-conf -list -/50-ne </dev/null
-conf -list -/45-nh </dev/null
-conf -list -/50-nh </dev/null
-conf -list -/45-ps </dev/null
-conf -list -/50-ps </dev/null
-conf -list -/45-pu </dev/null
-conf -list -/50-pu </dev/null
-conf -list -/50-pw </dev/null
-conf -list -/45-rp </dev/null
-conf -list -/50-rp </dev/null
-conf -list -/45-rs </dev/null
-conf -list -/50-rs </dev/null
-conf -list -/45-ru </dev/null
-conf -list -/50-ru </dev/null
//GO.SYSIN DD rc
echo x
sed 's/.//' >x <<'//GO.SYSIN DD x'
-11/45
-64k
-8dh
//GO.SYSIN DD x