// bravo1.df 

// Last modified October 25, 1979  6:44 PM by Taft

structure VPA :
	[ fn byte;
	fp byte;
	] 
structure PCTB :
	[ maxpc   word;
	macpc   word;
	rgpcd	word;
	rvmppccp	word;
	] 
structure PCD :
	[
	[ live	bit 1;
	[ parabits	bit 2 ] =	[ parastart	bit 1;
			[ para	bit 1 ] =	[ paraend	bit 1 ]
			] 
	fstartupd	bit 1			//new-carol
	fendupd	bit 1			//new-carol
	visibuf	bit 1;
	ref	bit 10; ]  =	[ p	bit 7;
			rc	bit 9;
			] 
	vpa	word;
	fop	word
	bifr	word;
	] 
manifest	[ lpcd = (size PCD)/16 ]

// structure FCSTATUS:
// 	[ 
// 	firstinpara	bit;
// 	lastintx	bit;
// 	intrailer	bit;
// 	blank	bit	13;
// 	] 

structure [
	[ lh  byte;
	rh  byte;
	] 
	= [ bit0 bit 1;
	blank bit 14;
	odd bit 1;
	] 
//	= [ funl bit 11;
//	funr bit 5;
//	] 
	] 
structure SEL :
	[ type 	word;
	doc	word;
	ww	word;
	cpfirst	word;
	xdfirst	word;
	cplast	word;
	xdlast	word;
	[ cpfirstorig	word;
	xdfirstorig	word;
	cplastorig	word;
	] =	[ 
		toggle	word;
		dl	word;
		newtoggle	word;
		] 
	xdlastorig	word;
	ulmode 	word;
	last	word;
	] 
structure FSSPEC:
	[ ldln	bit	6
	ldhdr	bit	7
	rflush bit 1;
	rj bit 1;
	center bit 1
	] 
structure BS:
	[
	dirty	bit 1;
	falloced	bit 1;
	blank	bit 14;
	] 

structure FDA:
	[
	track	bit	13;
	sector	bit	3;
	] 

structure OF:
	[ 
	macfp	word;
	version	word = fileid	word = dests	word;
	sn1	word;
	sn2	word;
	fFullPages	bit;
	wmode	bit 15;
	wf	word;
	macpos	word;
	pos	word;
	bphint	word;
	macbi 	word = macbp	word;
	formatted	word = clearance	word;
	fda	@FDA;
	rgda	word = rvrgbp	word;
	last	word;
	] 

// structure DESTS:
//	[ fn	byte;
//	ether	byte;
//	] 

// structure DIR:
// 	[ 
// 	type	bit	6;
// 	siz	bit	10;
// 	sn1	word;
// 	sn2	word;
// 	version	word;
// 	blank	word;
// 	da	word;
// 	name	word;
// 	] 

// minimal structure for a stream
// structure STREAM [
// 	blank word
// 	open word
// 	close word
// 	gets word
// 	puts word
// 	reset word
// 	putback word
// 	error word
// 	endof word
// 	stateof word
// 	blank word
// 	blank word
// 	blank word
// 	type word
// 	]

// structure RB[
// 	@STREAM
// 	readPointer word
// 	writePointer word
// 	bufferStart word
// 	bufferEnd word
// 	]

structure FB:
	[ macfr	word;
	mpfrfc	word;
	rglook1	word;
	rglook2	word;
	rvdnpi	word
	lists	word;
	] 

structure FBLOC:
	[ fb	byte;
	bw	byte;
	] 

structure FBFR:
	[ fb	byte;
	fr	byte;
	] 

structure BIFR:
	[
	bi byte;
	fr byte;
	]

structure FCODE[
	kind bit 4
	wordn bit 3
	bitn bit 4
	un bit 1
	blank bit 4
	]

// structure DOCPC:
// 	[ doc bit 4;
// 	pc bit 12;
// 	] 

structure FMSG:
	[ look1	word;
	[ look2	word] 
		= [ runlen	word ] ;
	] 

structure FINFO:
	[
	[ flags byte ] =
		[ newmsg bit
		[ more bit 5 ] =
			[ space bit
//			[ ibv bit ] =	[ ovstrike bit ]
			ibv bit
			[ bars bit 3 ] =	[ trans bit 2; blank bit 1 ] =
				[ overbar bit
				lowbar bit
				midbar bit
				]
			]
		[ visible bit 1
		fNoCk bit 1
		]
		] 
	char byte
	] 
// manifest	[
// 	finfoOvstrike = #100000 rshift (offset FINFO.ovstrike)
// 	]

structure SG:
	[ topmax	word;
	blmax	word;
	ldTop	word
	ldNext	word
	ofsetPrev	word
	] 

structure TL:
	[ ww	word;
	cpfirst	word;
	cplast	word
	mode	word;
	maccr	word
	] 

structure FUNFA:
	[ fun	byte
	fa	byte
	];

structure MAPSTATE:
	[ pc	word;
	bifr	word;
	fn	word
	fc	word
	] 
manifest
	[ sgl = (size SG)/16;
	]

structure AV:
	[
	nom	word;
	denom	word;
	last	word;
	];
manifest
	[ avl = (offset AV.last)/16;
	]

structure KCB[
	nextCommand word	// *
	status word		// set when command is completed
	command word		// *
	headerAddress word	// * these are memory addresses
	labelAddress word	// $
	dataAddress word	// *
	normalWakeups word	// $
	errorWakeups word	// $
	[ header  word 2 ] =
		[
		blank word
		diskAddress word	// * if DA argument ne fillInDA
		]
	]

structure WA:
	[ fp	byte
	rw	byte
	] 

structure PX [
	cw word	
	aW	word
	]

structure PL:
	[ cw	word	
	aW	word
	]

manifest
	[ lnkcb = (size KCB)/16;
	] 

manifest	[ maxlp = 25;
	maxl = 20;
	lfwidth = 4;
	maxcblind = 15;
	mastx = 38;
//	lpedoc = 0;
//	lpsyscom = 1;
//	lpsysstate = 2;
//	lpsyspast = 3;
//	lpsyslbrack = 4;
//	lpsysrbrack = 5;
//	lpsysdots = 6;
//	lpsystx0current = 8;
//	lpsystx1current = 9;
//	lpsystx2current = 10;
//	lpsystx3current = 11;
//	lpsystx4current = 12;
//	lpdoctrailer = 13;
//	buffercom = $1;
	maxcom = 36;
	yescomno = 11;
	zone1 = 9;
	ptflag = 1;
	ptname = 2;
	ptsl = 3;
	ptparam = 4;
	ptlabel = 5;
//	fsparunknown = 1;
	maxdiffsiz = 50;
	stackl = 1800;
	specstd = #2000		// lead = 2, parspacing = 0
	statusblind = 0;
	endofpage = 2;
	endofpiece = 1;
	endofrun = 3;
	pcdsiz = 4;
	resetchpters = 4;
	pctbovhd = (size PCTB)/16;
	maxrefstd = 4;
//	look1std = 0;
//	look2std = 0;
	maxfrscr = #100;
	maxbiscr = 50;
	state = 0;
	past = 5;
	buf1 = 1;
	buf2 = 2;
	buf3 = 3;
//	buf4 = 4;
	current = 0;
	lbrack = 1;
//	dots = 2;
	rbrack = 3;
	maxfieldsys = 18;
	paratrun = 1;
	parneeded = -1;
	parnotneeded = 0;
	paronfly = #377;
	paraonly = 1;
	paraboth = 3;
	modex = 1;
	modehc = 2;
	msgsiz = 2;
	finfoterm = -1;
	xaudright = 600;
	xaudleft = 45;
	xajump = xaudleft/2;
	maxcharperline = 200;
//	famentl = 11;
//	fientl = 8;
	dxaleft = 1;
	dxaright = 8;
	extrafont	= 30 // words needed by chmod
	tll = 3;
	careton = 2;
	caretoff = 1;
//	dcpendofdoc = 5;
//	dpcendofdoc = 1;
	lmapstate = (size MAPSTATE)/16;
	swtrans = 1;
	wstrans = 2;
	maxmn = 40;
	mnfixedstor = 1;
	eoldir = #376;
	fnnil = 0;
//	heightstd = 14
	lntod = 2
	ofNil = -1;
	fNil = #10101
	ofsetParamF = 4
	cwNil = -1
	siNil = -1
	pnil = -1
	cWPerPage = #400
	xwPage = 17 * (2540 / 2)
	]