This is a bit of a link dump - I was trying to find out how large an early C compiler might have been (in memory required) and in the process found these resources, but no answer.
Some classic papers and pages:
Early Unix history and evolution (Dennis Ritchie’s site)
Primeval C: two very early compilers (Dennis Ritchie’s site)
Links to “three PDF documents from the 7th edition document sources”
7th Edition Manual PDF
and in particular the document UNIX Version 7 Volume 2B which is a 250 page PDF, a concatenation of papers including
- p179 A Tour through the UNIX† C Compiler D. M. Ritchie
- p193 A Tour Through the Portable C Compiler S. C. Johnson
as well as
- p161 UNIX Implementation K. Thompson
- p171 The UNIX I/O System Dennis M. Ritchie
- p135 Assembler Reference Manual Dennis M. Ritchie
- p52 A Portable Fortran 77 Compiler S. I. Feldman, P. J. Weinberger
as well as chapters on dc, bc, awk, sed, ratfor, yacc, lex, m4 and more.
Some interesting links and claims in
A few interesting links in here:
Adding to this, I believe the first C compiler written outside Bell Labs ran on ITS.
The story goes, Alan Snyder was an MIT student interning at Bell Labs in 1973. At this point in time, B was being transformed into C, and Snyder was involved in that process. He’s credited with having suggested the
&& operators and the preprocessor. When he got back to MIT he implemented a C compiler with PDP-10, PDP11, and Honeywell 6000 backends. His thesis “A Portable Compiler for the Language C” is from 1975: https://apps.dtic.mil/sti/citations/ADA010218
I also convinced Dennis to add the extern declaration. He was thinking of something more like Fortran common, where all declarations have the same standing and are merged together. The Honeywell 6000 backend was the original version that I created for Bell Labs. I don’t know that it was ever used. I wrote the PDP-10 version at MIT because that was the machine available to me there.
All the early Unixen are on the archive so you can get a feel for how big an early C compiler was by looking at that source.
More like, look how little memory we have to cram every thing in, and just 16 bit code & data and arrays. Later, structures and long data types made it the programing langauge of the 70’s. I wonder what C would be like if Bell Labs developed UNIX on a PDP-11
extended to 18 bits? Some where I read that DEC was planning that,before they dropped
Thank you, I didn’t know the background about the extern declaration.
By the way, Alan’s compiler is available here: its/src/c at master · PDP-10/its · GitHub
It’s compiled from source code, and is still using a very early syntax from before K&R.
That’s the PDP-K. Some info collected here: PDP-K - Computer History Wiki
Ah, a bit of information from a paper posted nearby:
While the C language did not exist for the 1st Edition of UNIX, there was a C compiler in existence by the time of the 2nd Edition. We had the ‘last1120c’ C compiler source code and working executables, but to run them the restored kernel & filesystem needed to be modified to provide a 16 Kbyte process address space and 16 Kbyte swap areas on the disk. With these modifications the restored system was able to run the C compiler, and the C compiler was able to recompile itself.