.globl	ndefpt
.globl	insw
.globl	nodept
.globl	delct
.globl	optlev
.globl	lnodpt
.globl	nodesw
.globl	keysw
.globl	oldspt
.globl	exidpt
.globl	nnodpt
.globl	ollfpt
.globl	delpt
.globl	consw
.globl	delchn
.globl	dif
.globl	dge
.globl	das
.globl	spcsrp
.globl	keychn
/ml/i
/ml/i aug 30 1971
/mi-logic part 1 -- vars and data sections
/the following must be stored contiguously
	.bss
.globl	argct	;argct:	.=.+2 
.globl	stakpt	;stakpt:	.=.+2 
.globl	argpt	;argpt:	.=.+2 
.globl	dbugpt	;dbugpt:	.=.+2 
.globl	spt	;spt:	.=.+2 
.globl	mchlin	;mchlin:	.=.+2 
.globl	linect	;linect:	.=.+2 
.globl	argno	;argno:	.=.+2 
.globl	dbugsw	;dbugsw:	.=.+2 
.globl	tvarpt	;tvarpt:	.=.+2 
.globl	hashpt	;hashpt:	.=.+2 
.globl	mtchpt	;mtchpt:	.=.+2 
.globl	stoppt	;stoppt:	.=.+2 
.globl	labpt	;labpt:	.=.+2 
.globl	inffpt	;inffpt:	.=.+2 
.globl	skval	;skval:	.=.+2 
.globl	sklin	;sklin:	.=.+2 
.globl	ohsw	;ohsw:	.=.+2 
.globl	topspt	;topspt:	.=.+2 
.globl	mhshpt	;mhshpt:	.=.+2 
.globl	sqpt	;sqpt:	.=.+2 
.globl	linkpt	;linkpt:	.=.+2 
.globl	arglen	;arglen:	.=.+2 
.globl	optyp	;optyp:	.=.+2 
.globl	sqnum	;sqnum:	.=.+2 
.globl	sqsw	;sqsw:	.=.+2 
.globl	ntypsw	;ntypsw:	.=.+2 
.globl	allpt	;allpt:	.=.+2 
.globl	optpt	;optpt:	.=.+2 
.globl	opthpt	;opthpt:	.=.+2 
.globl	endpt	;endpt:	.=.+2 
.globl	pvarpt	;pvarpt:	.=.+2 
.globl	pvnum	;pvnum:	.=.+2 
.globl	glbwsw	;glbwsw:	.=.+2 
/end of contiguous block of variables
/miscellaneous variables
.globl	knpt	;knpt:	.=.+2 
.globl	etempt	;etempt:	.=.+2 
.globl	svarpt	;svarpt:	.=.+2 
.globl	fndpt	;fndpt:	.=.+2 
.globl	bfndpt	;bfndpt:	.=.+2 
.globl	infopt	;infopt:	.=.+2 
.globl	binfpt	;binfpt:	.=.+2 
.globl	tempt	;tempt:	.=.+2 
.globl	eriapt	;eriapt:	.=.+2 
.globl	bespt	;bespt:	.=.+2 
.globl	htabpt	;htabpt:	.=.+2 
.globl	tidpt	;tidpt:	.=.+2 
.globl	tspt	;tspt:	.=.+2 
.globl	cllfpt	;cllfpt:	.=.+2 
.globl	nargpt	;nargpt:	.=.+2 
.globl	stffpt	;stffpt:	.=.+2 
	cinfpt=optpt
	delpt=opthpt
	wnspt=allpt
	wnidpt=eriapt
.globl	skiplv	;skiplv:	.=.+2 
.globl	nestlv	;nestlv:	.=.+2 
.globl	oplev	;oplev:	.=.+2 
.globl	bindic	;bindic:	.=.+2 
.globl	level	;level:	.=.+2 
.globl	invoct	;invoct:	.=.+2 
.globl	temp	;temp:	.=.+2 
.globl	indic	;indic:	.=.+2 
.globl	chlink	;chlink:	.=.+2 
.globl	parnm	;parnm:	.=.+2 
.globl	type	;type:	.=.+2 
.globl	idlen	;idlen:	.=.+2 
.globl	bestpl	;bestpl:	.=.+2 
.globl	offset	;offset:	.=.+2 
.globl	meval	;meval:	.=.+2 
.globl	beslin	;beslin:	.=.+2 
.globl	caltyp	;caltyp:	.=.+2 
.globl	tlinct	;tlinct:	.=.+2 
.globl	tempsw	;tempsw:	.=.+2 
.globl	masksw	;masksw:	.=.+2 
.globl	coptsw	;coptsw:	.=.+2 
.globl	copdsw	;copdsw:	.=.+2 
	insw=coptsw
/used in processing structure representations
	nodept=nargpt
	nnodpt=mtchpt
	lnodpt=mhshpt
	exidpt=htabpt
	ollfpt=bfndpt
	oldspt=binfpt
	ndefpt=nargpt
	delct=beslin
	optlev=caltyp
	nodesw=coptsw
	keysw=copdsw
	consw=ohsw
.globl	exitsw	;exitsw:	.=.+2 
/used in processing macro expressions or inserts
	varpt=nargpt
	olidpt=optpt
	flagpt=allpt
	op1=beslin
	sum=caltyp
	negval=sklin
	opsw=masksw
	varsw=exitsw
	wsw=copdsw
/variables used only in envpr section
.globl	prstpt	;prstpt:	.=.+2 
.globl	prtapt	;prtapt:	.=.+2 
.globl	prtbpt	;prtbpt:	.=.+2 
.globl	mtype	;mtype:	.=.+2 
/variables needed only in lowl logic
.globl	srcpt	;srcpt:	.=.+2 
.globl	dstpt	;dstpt:	.=.+2 
.globl	lotemp	;lotemp:	.=.+2 
.globl	nlsw	;nlsw:	.=.+2 
.globl	exclmk	;exclmk:	.=.+2 
.globl	wthsmk	;wthsmk:	.=.+2 
.globl	withmk	;withmk:	.=.+2 
.globl	spcsmk	;spcsmk:	.=.+2 
	.data
tabfst:	0.
	/** for mcdef chain:
_180:	0
	0.
	5.
	<mcdef>
	.even
	dvars-.
	1.
	1.
	4.
	/** for mcskip chain:
_270:	0
	0.
	6.
	<mcskip>
	.even
	dcomma-.
	1.
	1.
	7.
	/** for mcins chain:
_60:	0
	0.
	5.
	<mcins>
	.even
	dcomma-.
	1.
	1.
	6.
	/** for mcwarn chain:
_190:	0
	0.
	6.
	<mcwarn>
	.even
	dnl-.
	1.
	1.
	5.
	/** for mcdefg chain:
_230:	0
	0.
	6.
	<mcdefg>
	.even
	dvars-.
	1.
	0.
	4.
	/** for mcskipg chain:
_240:	0
	0.
	7.
	<mcskipg>
	.even
	dcomma-.
	1.
	0.
	7.
	/** for mcinsg chain:
_231:	_230
	0.
	6.
	<mcinsg>
	.even
	dcomma-.
	1.
	0.
	6.
	/** for mcwarng chain:
_241:	_240
	0.
	7.
	<mcwarng>
	.even
	dnl-.
	1.
	0.
	5.
	/** for mcnodef chain:
_200:	0
	0.
	7.
	<mcnodef>
	.even
	0.
	1.
	1.
	0.
	/** for mcnoskip chain:
_290:	0
	0.
	8.
	<mcnoskip>
	.even
	0.
	1.
	1.
	3.
	/** for mcnoins chain:
_80:	0
	0.
	7.
	<mcnoins>
	.even
	0.
	1.
	1.
	2.
	/** for mcnowarn chain:
_210:	0
	0.
	8.
	<mcnowarn>
	.even
	0.
	1.
	1.
	1.
	/** for mcset chain:
_100:	0
	0.
	5.
	<mcset>
	.even
	deq-.
	1.
	0.
	8.
	/** for mcgo chain:
_211:	_210
	0.
	4.
	<mcgo>
	.even
	dif-.
	1.
	0.
	9.
	/** for mcalter chain:
_40:	0
	0.
	7.
	<mcalter>
	.even
	dto-.
	1.
	0.
	10.
	/** for mcnote chain:
_150:	0
	0.
	6.
	<mcnote>
	.even
	dnl-.
	1.
	0.
	11.
	/** for mcpvar chain:
_30:	0
	0.
	6.
	<mcpvar>
	.even
	dnl-.
	1.
	0.
	12.
	/** for mcleng chain:
_232:	_231
	0.
	6.
	<mcleng>
	.even
cwiths:	_wths
	1.
	<(>
	.even
	drbrac-.
	1.
	0.
	13.
	/** for mcsub chain:
_20:	0
	0.
	5.
	<mcsub>
	.even
	_wths
	1.
	<(>
	.even
	dcom1-.
	1.
	0.
	14.
	/** for mcstop chain:
_271:	_270
	0.
	6.
	<mcstop>
	.even
	dnl-.
	1.
	1.
	15.
/these are all chained for use by alter macro
delchn:	acas-.
dvars:	das-.
	4.
	<vars>
	.even
	das-.
acas:	acssas-.
das:	dssas-.
	2.
	<as>
	.even
	dnl-.
acssas:	acif-.
dssas:	0.
	4.
	<ssas>
	.even
	dnl-.
acif:	acunle-.
dif:	dunles-.
	2.
	<if>
	.even
	dge-.
acunle:	acge-.
dunles:	dnl-.
	6.
	<unless>
	.even
	dge-.
acge:	acgr-.
dge:	dgr-.
	2.
	<ge>
	.even
	dnl-.
acgr:	acen-.
dgr:	den-.
	2.
	<gr>
	.even
	dnl-.
acen:	acbc-.
den:	dbc-.
	2.
	<en>
	.even
	dnl-.
acbc:	aceq-.
dbc:	deq-.
	2.
	<bc>
	.even
	dnl-.
aceq:	acto-.
deq:	0.
	1.
	<=>
	.even
	dnl-.
acto:	acom1-.
dto:	0.
	2.
	<to>
	.even
	dnl-.
acom1:	acom2-.
dcom1:	0.
	1.
	<,>
	.even
	dcom2-.
acom2:	acrbra-.
dcom2:	0.
	1.
	<,>
	.even
	drbrac-.
acrbra:	acomma-.
drbrac:	0.
	1.
	<)>
	.even
	0.
acomma:	acnl-.
dcomma:	dnl-.
	1.
	<,>
	.even
	dnl-.
acnl:	laychn-.
dnl:	0.
	1.
	.byte	nlrep
	.even
	0.
/chain of layout characters
laychn:	knl-.
	rspace-.
	5.
	<space>
	.even
	0.
knl:	ktab-.
	layrep-.
	2.
	<nl>
	.even
	0.
ktab:	ksl-.
	rtab-.
	3.
	<tab>
	.even
	0.
ksl:	kspacs-.
	rsl-.
	2.
	<sl>
	.even
	0.
kspacs:	acn-.
ksps1:	spcsrp-.
	6.
	<spaces>
	.even
	0.
/node marker
acn:	keychn-.
	0.
	1.
knrep:	<n>
	.even
	0.
/keyword chain -- subchain of delimiter chain
keychn:	acwhs-.
	0.
	4.
	<with>
	.even
	0.
acwhs:	acopt-.
kwiths:	1.
	5.
	<withs>
	.even
	0.
acopt:	acor-.
kopt:	2.
	3.
	<opt>
	.even
	0.
acor:	acall-.
kor:	3.
	2.
	<or>
	.even
	0.
acall:	aclast-.
kall:	4.
	3.
	<all>
	.even
	0.
aclast:	0.
/dummy last entry
dummy:	0.
	0.
spcsrp:	.byte	sprep
/md tables --- hash-tables and error block
layrep:	.byte	nlrep
rtab:	.byte	tabrep
rsl:	.byte	slrep
rspace:	.byte	sprep
	.even
ghshtb:	0
	_20
	_30
	_40
	0
	_60
	0
	_80
	0
	_100
	0
	0
	0
	0
	_150
	0
	0
	_180
	_190
	_200
	_211
	0
	_232
	_241
	0
	0
	_271
	0
	_290
	0
	0
	0
	0.
	0.
	0.
	0.
	7.
/mi-logic of ml/i --- continued
/part 2 -- program sections
/version of aug 24 1971
	.text
begin:	mov	ffpt,r1
/reserve erbloc,hashtb,ghshtb,10 p variables
	mov	r1,etempt
	add	$14.,r1
	mov	r1,tempt
	add	$22.,r1
	mov	r1,pvarpt
	sub	etempt,r1
	jsr	pc,bumpff
	mov	$10.,r1
	mov	r1,pvnum
	inc	ffpt
	bic	$1,ffpt
	mov	r1,(ffpt)+
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	lfpt,endpt
	mov	$7.,glbwsw
/zeroise permanent variables
zplp:	add	$2.,tempt
	cmp	tempt,pvarpt
	jeq	setmks
	clr	*tempt
	jbr	zplp
/set values of special markers
setmks:
	mov	$cwiths,tempt
	mov	*tempt,r1
	mov	r1,wthsmk
	dec	r1
	mov	r1,withmk
	dec	r1
	mov	r1,exclmk
	dec	r1
	mov	r1,spcsmk
	mov	$1.,nlsw
	clr	r1
	mov	r1,labpt
	mov	r1,stoppt
	mov	r1,tvarpt
	mov	r1,argpt
	clr	r1
	mov	r1,oplev
	mov	r1,nestlv
	mov	r1,skiplv
	mov	r1,invoct
	mov	r1,level
	mov	r1,tlinct
	mov	r1,skval
	clr	bindic
	mov	$1.,linect
	clr	dbugsw
	clr	-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	$ghshtb,hashpt
	jsr	pc,stkhsh
/set limits on locals
	mov	hashpt,r1
	add	$64.,r1
	mov	r1,tempt
limlp:
	mov	endpt,*tempt
	add	$2.,tempt
	tst	*tempt
	jeq	limlp
	mov	$knrep,knpt
	jbr	mbegin
/input 524,output 515, 2.3% optimalized
