________Elliott 900-Series BCPL Implementation.
________=======================================
________Terry Froggatt, 18th December 2018.


What is it?.
------------

An implementation of BCPL, for the Elliott 900-Series 18-bit
computers, comprising a (mainly newly-written) O-code translator,
generating production-quality recursive SIR, (not merely "good
enough for bootstrapping"), and a (minimal changes) front end,
based on the University of York's 1977/8 PDP-11 Unix implementation.


Installation.
-------------

The *.ZIP files mentioned here are all hiding on my website at
"www.tjfroggatt.plus.com/BCPL" and their names are in upper case.

To install BCPL for the Elliott 900-series onto your host PC,
you need to download & unzip MAIN.ZIP into a new folder.
This contains the BCPL front end (in source & binary form),
and some command files.

You also need to download & unzip some PC-executable programs,
including the BCPL code generator, into the same folder.
If your PC is running a 16-bit or 32-bit DOS or
Windows system, download them from MERIDIAN.ZIP.
For a 64-bit Windows system, download them from AONIX.ZIP.

For any other host system, you are welcome to download
the Ada sources of these executables from SOURCE.ZIP,
and compile them with an appropriate compiler.

Finally you can download & unzip some sample BCPL programs
from DEMOS.ZIP, and read some explanations from NOTES.TXT.


Method of Use.
--------------

A modest library is provided, which you can reference from your
BCPL program via "GET BCPLLIB.GET" if you use upper case library
names (as in the York implementation) or via "GET libhdr" if you
use lower case library names (as now on Martin Richard's website).

The batch file BCPL.BAT will compile & run a simple BCPL program.
Open a DOS prompt and CD to your folder of downloaded files.
Then for example, for the FACT.BCP demonstration program,
type "BCPL FACT" (not "BCPL FACT.BCP") at the DOS prompt.
The file name should be no more than 8 characters long
and the file extension must be ".BCP".

BCPL.BAT performs the following operations:
1. It tacks the BCPL part of the library (which includes for example
___READN, WRITEN, & WRITEF) onto the end of your BCPL source, and
___then it runs a PC executable to implement the BCPL GET command.
2. It passes this expanded source through the BCPL front end,
___which is a 900-series program running in my simulator,
___producing an O-code file, for example FACT.OCO.
3. It passes the O-code file through the code generator, which
___is a PC executable, producing a SIR file, for example FACT.SIR,
___and tacks some system code (for subroutine entry/exit) and
___the SIR part of the library (for character I/O and string
___pack/unpack) onto the end of it.
4. It assembles the SIR file with "2-PASS SIR, 7/1/71",
___running in my simulator, to generate the label list,
___FACT.MAP, and a binary paper tape image, FACT.BIN.
5. It runs the binary paper tape image in the simulator, on the
___assumption that it needs no input (otherwise it just loads the
___image then quits), placing the output in, for example, FACT.OUT.

For test programs requiring some input, you can create a file
with the same name as your *.BCP file but with a *.SIM extension,
using RUNBCPL.SIM as your starting point, and editing your input
into it, see for example, ENIGMA.SIM, then run BCPL.BAT as above.

Or for interactive input, having run BCPL.BAT with no input, you
can simply load & run the *.BIN file into my simulator or into
any other 900 simulator, without using a *.BAT file. And of
course you can run the *.BIN file on a real 900-series computer.


Error Indications.
------------------

The 64-bit executables might upset your virus checker,
and might generate a short stack dump as they finish,
but nevertheless they appear to work.

The executable which implements the GET command will report
PROGRAM_ERROR if, say, a semicolon follows GET "filename",
and it will report NAME_ERROR if it cannot find the file.

Syntax errors detected by the front end will appear in the
O-code file, ahead of the O-code (if any) for that section,
(so for single-section programs, at the start of the file).

The semantic "ERROR, NAME NOT DECLARED" error detected by the
front end is particularly unhelpful because it does not give
the name or its location. The point at which the O-code stops,
or where the SIR in BCPLCODE.TMP stops, might give a clue.

Executing an unset Global Vector item will cause the run-time
system to enter a dynamic stop (and the simulator to quit).

The run-time library ignores parity on input,
but it does generate correct parity on output.


A few other points.
-------------------

As a confidence check, the batch file REBUILD.BAT
(with no parameters) will rebuild the front-end from
its source files, using itself and the code generator.
The resulting REBUILD.BIN should match the issued FRONTEND.BIN.

Nowadays in BCPL, symbol "!" is used for vector indexing
and symbol "%" is used for string indexing. In this
implementation, both are implemented as vector indexing.
The example ENIGMA.BCP shows how to work round this.


*** EOF ***