BCPL Bestiary

A random collection of BCPL versions.

BCPL for ICL 1900 systems

Martin Richards's compiler was ported from the Titan to the ICL 1900 by Bernard Sufrin at the University of Essex in 1969.

However the version of ICL 1900 BCPL we have appears not to be that version, notably the code generated seems not to be that described by Bernard Sufrin.

The ICL 1900 compiler contains a few BCPL extensions, notably the true/false branches of a TEST statement can be written as IFSO and IFNOT and in in either order. It has been suggested that this is a dialect of BCPL introduced at Oxford.

No byte access operator %, no subfield operators SLCT and OF.

Essex BCPL for the PDP10

A second compiler was written by Pete Gardner at the University of Essex, it directly generated PDP10 code rather than OCODE. Work on the compiler started in 1973 and it was released in 1974.

The Essex compiler introduced many extensions to BCPL, including the SELECTOR (spelled SLCT by some other compilers) and :: (spelled OF by some other compilers) operators.

The Essex compiler included the "op:=" assigning operators.

Essex BCPL also introduced an EXTERNAL declaration as an alternative to the standard BCPL GLOBAL vector.

Compiled versions of the Essex BCPL compiler are available on GitHub. The source may have been recovered, but I know of no available copy.

DECUS BCPL

A second version of BCPL for the PDP10 was also produced by someone. The language compiled seems much closer to Xerox BCPL than the Essex compiler:
let Start() be
[st
  OUTPUT ← CreateOutput(0)	// yes, that's a backarrow
  INPUT ← FindInput(0)
...
]st
Example of DECUS BCPL.

Xerox BCPL

Xerox used a version of BCPL for programming the Xerox Alto.

Xerox BCPL used = for assignments instead of :=, the equality operator was eq.

Like ICL 1900 BCPL the true/false branches of a test command could be written ifso and ifnot, in either order.

Xerox BCPL had a complicated extension for structure and subfield access, using the right-lump (>>), left-lump (<<) and heffalump (=>) operators.

Multics BCPL

Fairly normal looking BCPL, except it could "C" style vector indexing:
let a, b, c = 0		// sic
let v = vec 100
a := v[20]		// sic
Documentation for code generator M

Martin Richards BCPL

Martin Richards continues to work on BCPL and has an extended version of his compiler that includes the byte access operator %, the op:= assignment operators and the subfield operators SLCT and OF.

All questions to john@AtlanTech.com