The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] C compiler
@ 2005-09-26 19:28 Bill Cunningham
  2005-09-26 22:04 ` Warren Toomey
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Cunningham @ 2005-09-26 19:28 UTC (permalink / raw)


    In some of the eary versions of unix if I'm correct you had to generate
the C compiler. Now how was that done? Was the compiler written in assembly
and the assembler generated crt0 crt1 and so on?

Bill





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [TUHS] C compiler
  2005-09-26 19:28 [TUHS] C compiler Bill Cunningham
@ 2005-09-26 22:04 ` Warren Toomey
  2005-09-27  7:45   ` Wesley Parish
  0 siblings, 1 reply; 4+ messages in thread
From: Warren Toomey @ 2005-09-26 22:04 UTC (permalink / raw)


On Mon, Sep 26, 2005 at 03:28:33PM -0400, Bill Cunningham wrote:
>     In some of the eary versions of unix if I'm correct you had to generate
> the C compiler. Now how was that done? Was the compiler written in assembly
> and the assembler generated crt0 crt1 and so on?

If you had a distribution tape, then it came with C compiler binaries and
source. You used the compiler binaries to rebuild the compiler.

Obviously, to get to that point was a bit harder. 
A good reference to this is "The Development of the C Language" by
Dennis Ritchie, available at http://cm.bell-labs.com/cm/cs/who/dmr/chist.html

A quick read seems to indicate that Ken created a language called B which
was patterned on BCPL, with a compiler initially in assembly language. Then
Ken rewrote the B compiler in B and bootstrapped it using the existing
compiler. Then Dennis extended the B language to become NB, which then
evolved to become C.

Along the way, new language features were added in to the compiler,
but the features couldn't be used _in_ the compiler until they worked.
As noted on this page, http://cm.bell-labs.com/cm/cs/who/dmr/primevalC.html,
Dennis says "Evolving compilers written in their own language are careful
not to take advantage of their own latest features."

Cheers,
	Warren



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [TUHS] C compiler
  2005-09-27  7:45   ` Wesley Parish
@ 2005-09-27  7:44     ` Warren Toomey
  0 siblings, 0 replies; 4+ messages in thread
From: Warren Toomey @ 2005-09-27  7:44 UTC (permalink / raw)


On Tue, Sep 27, 2005 at 07:45:03PM +1200, Wesley Parish wrote:
> B!  I would like to have a look at that - that, and NB.
> Does anyone know if they're still extant, or their documentation at the very 
> least?  (I've seen BCPL, and read some of its documentation, but it's still a 
> hop-skip-and-a-jump away from C.  Some BCPL things do seem a little bit 
> strange to a C user ... ;)

One or both of the referenced articles suggest that all traces have disappeared.
There may be a B or NB language manual laying around... Yes:
http://cm.bell-labs.com/cm/cs/who/dmr/kbman.html and
http://cm.bell-labs.com/cm/cs/who/dmr/bintro.html

	Warren



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [TUHS] C compiler
  2005-09-26 22:04 ` Warren Toomey
@ 2005-09-27  7:45   ` Wesley Parish
  2005-09-27  7:44     ` Warren Toomey
  0 siblings, 1 reply; 4+ messages in thread
From: Wesley Parish @ 2005-09-27  7:45 UTC (permalink / raw)


B!  I would like to have a look at that - that, and NB.

Does anyone know if they're still extant, or their documentation at the very 
least?  (I've seen BCPL, and read some of its documentation, but it's still a 
hop-skip-and-a-jump away from C.  Some BCPL things do seem a little bit 
strange to a C user ... ;)

Wesley Parish

On Tue, 27 Sep 2005 10:04, Warren Toomey wrote:
> On Mon, Sep 26, 2005 at 03:28:33PM -0400, Bill Cunningham wrote:
> >     In some of the eary versions of unix if I'm correct you had to
> > generate the C compiler. Now how was that done? Was the compiler written
> > in assembly and the assembler generated crt0 crt1 and so on?
>
> If you had a distribution tape, then it came with C compiler binaries and
> source. You used the compiler binaries to rebuild the compiler.
>
> Obviously, to get to that point was a bit harder.
> A good reference to this is "The Development of the C Language" by
> Dennis Ritchie, available at
> http://cm.bell-labs.com/cm/cs/who/dmr/chist.html
>
> A quick read seems to indicate that Ken created a language called B which
> was patterned on BCPL, with a compiler initially in assembly language. Then
> Ken rewrote the B compiler in B and bootstrapped it using the existing
> compiler. Then Dennis extended the B language to become NB, which then
> evolved to become C.
>
> Along the way, new language features were added in to the compiler,
> but the features couldn't be used _in_ the compiler until they worked.
> As noted on this page,
> http://cm.bell-labs.com/cm/cs/who/dmr/primevalC.html, Dennis says "Evolving
> compilers written in their own language are careful not to take advantage
> of their own latest features."
>
> Cheers,
> 	Warren
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> http://minnie.tuhs.org/mailman/listinfo/tuhs

-- 
Clinersterton beademung, with all of love - RIP James Blish
-----
Mau e ki, he aha te mea nui?
You ask, what is the most important thing?
Maku e ki, he tangata, he tangata, he tangata.
I reply, it is people, it is people, it is people.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-27  7:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-26 19:28 [TUHS] C compiler Bill Cunningham
2005-09-26 22:04 ` Warren Toomey
2005-09-27  7:45   ` Wesley Parish
2005-09-27  7:44     ` Warren Toomey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).