            /ap, cr, sbc, snl, rcw, rrc, rch, er, er1, red, blk, eh

u,	halt
ap,	zero lmb
	call rpr
	sett bc, -1
	store nl
	sett mjp, -2

pf,	sett ft, fb

pg,	call rp		/read title

	store chr
	load ft
	putback f, chr
	testnl chr, (21, pg1

xp,	sett pfu, pfr
	sett emp, fb
	sett tc, -1
	goto erf

pg1,	step1 ft
	trnl (fl, pg
hap,	goto rrz

pfr,	zero 1u
	zero 3u
	sett irl, -1
	zero tll
	zero ft
	sett fi, 1
	store sid
	zero rob
	zero gi
	zero gis
	zero ao
	zero tc
	zero mm
	zero ss
	sett rb, 1
	store bc1
	store bc2
	store tbc
	sett tim, -1
	sett st, 26
	goto pum		/copies nt.kt.mt, goes to s1


cr,	answer crx
	type (77
crx,	exit cr

                
                                
sbc,	answer sbx
	step1 bc2
	step1 tbc
	step1 bc
	addi nl
	tgrec all, s3x
	load bc
	complement
sbx,	exit sbc


snl,	answer swx
	step1 nl
	addi bc
	tgrec all, s3x
	load nl
swx,	exit snl

                
                                
rcw,	answer rwx
	load fi
rwx,	exit rcw

rrc,	answer rrx
	move fl2, fi
	store fl1
rrx,	exit rrc


rch,	answer rcx
	load ft
	tgrel fi, rcf
	sett mbh, fb
	store fi
	store ft
	store fl1
	store fl2
	sett bgs, 1

rcy,	call rp		/read body

	store ch
	trnl (74, rcc

rcu,	call rp		/read comment

	trnl (72, rcu
	goto rcy

rcc,	load ch
	trze rc1
	trel (21, rc1
	clear
	goto rc2
rc1,	load (1
rc2,	store pp
	load ft
	putback f, ch
	step1 ft
	tlesc fw, rcs
	load ft
	tlesc fl, rce
	goto rrz
rce,	load ch
	trel (21, rfc
rcs,	load bgs
	diswith ch, rdt
                
                                
rdt,	rd0	rd1	rd2	rd3	rd4

rd0,	trze rda
	trnl (21, rdp
rda,	sett bgs, 1
	goto rcy
rd1,	trnl (65, rdp
	sett bgs, 2
	goto rcy
rd2,	trnl (45, rdp
	sett bgs, 3
	goto rcy
rd3,	trnl (64, rdp
	sett bgs, 4
	goto rcy
rd4,	trze rfc
	trel (21, rfc
rdp,	move pp, bgs
	goto rcy

rfc,	istepa ft, 1
rcf,	load fi
	lookup f
	store ch
	step1 fi
	load ch
	trze rf1
	trel (21, rf1
	move fl1, fl2
	goto rff
rf1,	move fi, fl1

rff,	load ch
rcx,	exit rch

                
                                /error

er,	answer erx
	store arg
	sett uin, 1
	goto erc
er1,	answer ery
	store arg
	sett uin, -1

erc,	sett pfu, ec3
ert,	load mjp
	tgrec -2, erq
	call red
	write erq
	text /
To err is human---to forgive, divine.

/
erq,	call blk
	testnl mjp, bc, erk
	testel tjp, tc, ec
erk,	move mbh, emp

erf,	zero blc
	sett etc, 1
	load emp

err,	lookup f
	store chy
	trze et1
	trel (21, ec0
	type chy
	goto etr

et1,	step1 etc
	subt tc
	trze et2
	trnl (1, et4
	call blk
	goto et4
et2,	call red
et4,	load blc
	tlesc 100, ets
	call cr
	zero blc
	goto eti
ets,	type (0
etr,	step1 blc
eti,	step1 emp
	goto err
                
                                
ec0,	call blk
	type (21
	call cr

ec,	govia pfu
ec3,	type (36
	testp uin, ec1
	call red
ec1,	print arg
	call blk
ec2,	call cr
	move bc, mjp
	move tc, tjp
	testp uin, erx
ery,	exit er1
erx,	exit er

                
                                /red, black, eh

red,	answer rex
	testm rb, rex
	type (35
	sett rb, -1
rex,	exit red


blk,	answer blx
	testp rb, blx
	type (34
	sett rb, +1
blx,	exit blk


s1y,
s1z,	error flexo tmf
	goto te
s1x,	error flexo tff
	goto te
s1w,	error flexo unc
	goto te
s1v,	error flexo ert
	goto te

s3x,	call cr
	write eha
	text /Table overflow.  Subdivide source program./
eha,	call cr
	goto u
rrz,	call cr
	write rry
	text /Measure has too many characters.  Rearrange tape./
rry,	goto eha

pcz,	error flexo nps
	test0 chr, te
pz2,	call rch
	store chr
	trze pz3
	trnl (21, pz2
pz3,	move chr, trm
	goto te

start
                
                                                                                                                                                                                             

