
relocatable doctor = section 1

	define inform
printx |Assemble in following order:
section 1, pass 1
system definitions, pass 1
doctor, pass 1
section 2, pass 1
section 2, pass 2  (test, TAC = 650000)
section 1, pass 2
doctor, pass 2
restart for start block|
	terminate

repeat 1if vz .-20, inform

nsy=151

relocatable

nsy+nsy+12+1+.|

start


relocatable doctor = section 2

readin

|regular input routine

17756|

inrb,	r3c
	sto inra
	trn inra
	cylUalrUaxr
	trn inrd
	r3cUlad
	alrUxro
inrc,	r3c
inra,	xx
	lad
	alr
	ado inra
	tix inrc
	r3cUiad
	tze inrb
inrd,	hlt
	trx 0

buf|

|macros for rll format

	define r w
	word stx ., w
.+1|	terminate

	define a w
	word slx ., w
.+1|	terminate

	define begin z
	word trx z, 0
	terminate

|read-in mode section

	word opr 2001

rrra,	r llx rrrb
ct,	r opr 307
cwd,	r r3cUlxr
	r stx rrrc
mel,	r r3c
	r iad
rrrc,	.+1|
cks,	r trx rrra
rrrb,
rel,	r 17777

	word trx rrra

|relocatable relocating loader

rrs,	r aux rrk
	r sxa rel
	a xcc
	r sto mel

rrn,	a r3c
	a alrUaxr
	r aux rel
	r sxa .+1
	r trn .
	a r3cUlad
	r sto cks
	r add mslr
	a alrUcom
	a xad
	r add cstx
	a lxr
	r sto rrx
	r tra rra

rrb,	r ado ct
	r trn rrc

rra,	r lda mi8
	r sto ct
	a r3cUlro
	r sto cwd
	r add cks
	r sto cks

rrc,	r lda cwd
	r trn rre
	a cyl

rrf,	a cyl
	r sto cwd
	a r3c
	a iad

rrx,	a xx
	a lacUlro
	r add cks
	r sto cks
	r tix rrb
	a r3cUcyl
	r tze rrn
	a hltUclcUlro
	r tra rrn

rre,	r llr mel
	a cyl
	r trn rrf
	r llr rel
	r tra rrf

rrk,	a -nsy-nsy-12-1
mi8,	a -8
mslr,	a -slr
cstx,	a stx

	begin rrs

	xx=hlt

	start
m