HOW TO BUILD BCPL AND ACG.
NB THIS IS NOT A SHELL FILE

Building BCPL.
Files required:
tsyn.bpl
ntrn.bpl
master.bpl
dlib.hdr
synhdr.bpl
trnhdr.bpl
llib.obj
stack.m11
first.obj
sects.m11

There are two ways of doing this:
first the easy way:

ed stack.m11
/6/s/6000\./4500/p
w
q
Set up a stack of 4500 octal words
and say
bcgen -u:az -sel:fdcs stack.m11 tsyn ntrn master
the output from bcgen should look like:
macro: stack.m11
bcpl( -u ): tsyn.bpl
Tree size 5327
Tree size 4266
Tree size 4004
Tree size 4900
Tree size 3937
Tree size 4250
Tree size 3371
Tree size 3944
Phase 1 complete
acg( -az ): tsyn.ocd
Module size = 5522. words
macro: tsyn.m11
bcpl( -u ): ntrn.bpl
Tree size 4501
Tree size 5219
Tree size 4928
Tree size 4353
Tree size 4702
Tree size 4504
Tree size 4137
Phase 1 complete
acg( -az ): ntrn.ocd
Module size = 5319. words
macro: ntrn.m11
bcpl( -u ): master.bpl
Tree size 5360
Tree size 4648
Phase 1 complete
acg( -az ): master.ocd
Module size = 2142. words
macro: master.m11
macro: tlib.m11
macro: iolib.m11
Linking: 
Local tlib.obj used
Local iolib.obj used
Local stack.obj used

You now have a built BCPL in the file master.out
so
mv master.out bcpl
strip bcpl

and away you go
You will be left with the following work files to delete:
tsyn.obj
ntrn.obj
master.obj
iolib.obj
tlib.obj
stack.obj

The hard way (if you can't get bcgen going)

ed stack.m11
/6/s/6000\./4500/p
w
q
macro sects.m11 stack.m11
bcpl -u tsyn.bpl
acg -az tsyn.ocd
macro sects.m11 tsyn.m11
bcpl -u ntrn.bpl
acg -az ntrn.ocd
macro sects.m11 ntrn.m11
bcpl -u master.bpl
acg -az master.ocd
macro sects.m11 master.m11
Create a header file to optimise tlib and iolib
ed
a
	FILEDEC=0
	DEBUG = 0
	SYSDEC = 0
	CHPHS=0
w libhdr.m11
q

macro libhdr.m11 tlib.m11
macro libhdr.m11 iolib.m11
and now you can link
linkr tlib.obj iolib.obj stack.obj first.obj llib.obj tsyn.obj ntrn.obj master.obj
mv master.out bcpl
strip bcpl
and delete lots of files


BUILDING ACG.

Files required:
acg.bpl
acghdr.bpl
dlib.hdr
shrsects.obj
and library files as above
acg needs a stack of 6000 decimal words so either re-edit
your existing stack.m11 or get an new copy of stack.obj

Then say:
bcgen -shr -sel:fdcs -ul7000:az -mac:xs:5 acg.bpl

this makes a sharable version, you need extra space for
BCPL to do its job and macro needs some extra space too
The output from the program should be

bcpl( -ul7000 ): acg.bpl
Tree size 4492
Tree size 6262
Tree size 4983
Tree size 5565
Tree size 6240
Tree size 6122
Tree size 5456
Tree size 5604
Tree size 6396
Phase 1 complete
acg( -az ): acg.ocd
Module size = 8714. words
macro( -xs:5 ): acg.m11
macro: tlib.m11
macro: iolib.m11
Linking: 
Local tlib.obj used
Local iolib.obj used

You now have a file called acg.out, so
mv acg.out acg
strip acg

and you have a runnable code generator.

Now the hard way:

bcpl -ul7000 acg.bpl
acg -az acg.ocd
macro -xs:5 sects.m11 acg.m11

produce a local header file and macro tlib and iolib
for a local tlib.obj and iolib.obj as above
and link

linkr shrsects.obj tlib.obj iolib.obj stack.obj first.obj llib.obj acg.obj

Good luck
Peter C
