[TUHS] New project to recreate the B compiler for the PDP-11

Robert Swierczek rmswierczek at gmail.com
Wed Apr 24 08:11:01 AEST 2019

I just started a project to recreate the B compiler for the PDP-11 as
authentically as possible, given the few fragments that remain and
some educated guesswork.  It should be fun (for various definitions of

Here is the repository  https://github.com/rswier/pdp11-B

I have borrowed some tools from Warren's

I have made a good start at reverse engineering the B run time library
in /usr/lib/libb.a.  I have tried to make the source match the same
style as the earliest C library found on the last1120c-bits tape.  The
remaining functions in libb.a include printf and printn which appear
to be written in B.  This should provide more clues needed to create
the compiler.

I am also tackling the dis-assembly of the threaded code interpreter
/usr/lib/bilib.a (which at the moment is a big mess on my hard-drive)

Later steps will include creating the B compiler itself by carefully
pruning down the last1120c C compiler.  The fun here will be to
boot-strap the B compiler without help from any existing modern
compilers.  I think TMG will come into play to make that happen.

All are welcome to contribute!


More information about the TUHS mailing list