[TUHS] Listing of early Unix source code from the Computer History Museum.

Phil Budne phil at ultimate.com
Mon May 26 06:30:19 AEST 2025


Jackson Helie G wrote:
> What program's source code is on pages 145 - 169 (assembly listings are t1
> - t8) in the CHM release of UNIX BOOK II?

>From a quick look, this is the TMG compiler compiler runtime.  The
compiler for the TMG language (TMGL) itself (almost certainly written
in TMGL) did not survive, nor did it's compiled output.

>From the runtime, I recreated a TMGL compiler, and also a simple B
compiler, *BUT* I don't think either works within the exact (symbol
table?) space limits in the (previously entered) PDF files. I was a
TMG novice, and used labeled expressions freely; I don't doubt Doug
McIlroy's original version was FAR more clever (he had previously
worked on a TMG based PL/I compiler for Multics).

This is the first I've heard of PDFs coming to light in dmr's papers,
so I can't say if they're of the same documents.

My work is in a branch of my fork of the pdp7-unix repo:
https://github.com/philbudne/pdp7-unix/tree/tmg

Almost 2200 lines of notes on my Odyssey:
https://github.com/philbudne/pdp7-unix/blob/tmg/misc/tmg-notes.txt

Files I added:
https://github.com/philbudne/pdp7-unix/tree/tmg/src/other/pbtmg

  TMGL compiler (compiles under itself and PDP-11 tmgl):
  https://github.com/philbudne/pdp7-unix/blob/tmg/src/other/pbtmg/t0.t
  
  B compiler in TMGL:
  https://github.com/philbudne/pdp7-unix/blob/tmg/src/other/pbtmg/b.t


More information about the TUHS mailing list