Download the BCPL source code.
$ wget http://www.cl.cam.ac.uk/users/mr/BCPL/bcpl.tgz
Unpack the BCPL source code.
$ tar -xf bcpl.tgz
Go to the BCPL source code directory.
$ cd BCPL/cintcode
If you're on OS X open up the Makefile in your preferred text editor and uncomment lines 190 and 191 so that they look like this:
CC = gcc -O4 -m32 -DforMacOSX
ENDER = litender
Set the BCPLROOT, PATH, BCPLPATH, and BCPLHDRS environment variables. Note: This step will need to be done every time you intend to use BCPL. Alternatively you can set this in your shell's initialization file. The below commands assume you're still in the BCPL/cintcode directory.
$ EXPORT BCPLROOT=`pwd`
$ EXPORT PATH=$PATH:$BCPLROOT/bin
$ EXPORT BCPLPATH=$BCPLROOT/cin
$ EXPORT BCPLHDRS=$BCPLROOT/g
Run the make clean command.
$ make clean
Run the make command.
$ make
To run a BCPL source file:
$ cintsys
BCPL 32-bit Cintcode System (21 Oct 2015)
0.000> c b helloworld
bcpl helloworld.b to helloworld hdrs BCPLHDRS t32
BCPL (10 Oct 2014) with simple floating point
Code size = 80 bytes of 32-bit little ender Cintcode
0.027> helloworld