4 ms·
The earliest known versions of Dennis Ritchie's first C compiler
- doppioandante 9y agoHow was this compiler bootstrapped?
- pieterr 9y agoExplained here: https://www.bell-labs.com/usr/dmr/www/chist.html https://www.bell-labs.com/usr/dmr/www/chist.html
- mseepgood 9y agoBy extending Ken Thompson's B compiler. The B compiler was initially written in TMG before Thompson rewrote it in B. Then Richie added types like 'char' and 'int' and called it NB ("new B"), then he added structs and C was born. The TMG interpreter used by Thompson to create B was implemented for the PDP-7 by Doug McIlroy in PDP-7 assembly language: http://minnie.tuhs.org/pipermail/tuhs/2014-September/005149.html http://minnie.tuhs.org/pipermail/tuhs/2014-September/005149.... This is what TMG looked like: http://multicians.org/tmg.html http://multicians.org/tmg.html
- alexforster 9y agoThere's type inference everywhere!
- kccqzy 9y agoOr rather, undeclared types are assumed to be int. Is that what you are talking about?
- alexforster 9y agoThe keyword "auto" means int?
- swolchok 9y agoIt means automatic storage duration (i.e., on the stack). https://stackoverflow.com/questions/2192547/where-is-the-c-auto-keyword-used https://stackoverflow.com/questions/2192547/where-is-the-c-a...
- cygx 9y ago'auto' means 'automatic storage duration' and does not carry type information.
- igravious 9y agoHoly heck. 1972. The year I was born. And that PDP-11 emulator is a blast. RESTRICTED RIGHTS Use, duplication or disclosure is subject to restrictions stated in Contract with Western Electric Company, Inc.
- federicoponzi 9y agoFor some reason, I was a bit suprised for the extensive use of gotos. Thanks for sharing this pearl!
- salgernon 9y agoThis is cute: switch (o=symbol()) { .... /* short constant */ case 21: case21: *cp++ = block(1,21,ctyp,0,cval); goto tand; .... elsewhere in the switch .... cval = -cval; goto case21;
- khedoros1 9y agoThe Living Computer museum provides logins to several old pieces of hardware. I wonder how many people are going to request logins to the PDP-11 to try to build the C compiler?
- technofiend 9y agoYou may have your very own PDP-8, PDP-11, or PDP-10 simply by running SIMH.
- khedoros1 9y agoEmulation's useful, but it's something that I've been doing in various forms for over half of my life. There'd be a novelty to actually running something on a 40 or 50 year old piece of refurbished hardware, adapted to run as a host on the Internet.
- technofiend 9y agoNo doubt. I had a few raised eyebrows back when my company ditched a VAX 11/730 and I took it, but it was a VAX that ran on 110 and it was my very own. Made a damn fine usenet node for the limited feed that went to it.