The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] TMG and B
@ 2014-09-30 13:52 Noel Chiappa
  2014-09-30 14:32 ` Clem Cole
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Noel Chiappa @ 2014-09-30 13:52 UTC (permalink / raw)


    > From: arnold at skeeve.com

    > it was clear at the time that UNIX and what was happening was extremely
    > special .. Those of you who were there really were part of a "golden
    > age".

I once observed to Jerry Saltzer that when I started at the MIT CS labs, I
had been bummed because I had missed what I considered their 'Golden Age' -
the work on CTSS and Multics.

When I showed up there, I did a deal where they let me use a PDP-11/40 to
explore some OS ideas I had, if I woule write diagnostics on it for a ring
interface they were working on - part of a project on networking that
included work on something called internetworking.

I had no idea what I was getting into!

And of course the networking work soon sucked me in completely. In that
message to Jerry, I said something to the effect of 'clearly I've lived
through a second golden age, and only now am I understanding that'.

	Noel



^ permalink raw reply	[flat|nested] 17+ messages in thread
* [TUHS] TMG and B
@ 2014-10-01 14:04 Noel Chiappa
  0 siblings, 0 replies; 17+ messages in thread
From: Noel Chiappa @ 2014-10-01 14:04 UTC (permalink / raw)


    > From: Doug McIlroy <doug at cs.dartmouth.edu>

    > None of this is useful, though, without a PDP-11 binary for tmg

There seems to be be binary for TMG on the V6 distribution.

	Noel



^ permalink raw reply	[flat|nested] 17+ messages in thread
* [TUHS] TMG and B
@ 2014-10-01 13:53 Doug McIlroy
  2014-10-01 20:23 ` Dave Horsfall
  0 siblings, 1 reply; 17+ messages in thread
From: Doug McIlroy @ 2014-10-01 13:53 UTC (permalink / raw)


TMG was in v2-v6, sometimes in man1 and sometimes in man6.
I have an apparently complete source listing. The year is
uncertain. (Back then date headings from pr didn't mention the year!)
The accompanying manual, though, is dated 1972. There is also, besides
the TMGL definition of TMGL, a TMGL definition of pig Latin as a
simple test case.

None of this is useful, though, without a PDP-11 binary for tmg--
the usual chicken-and-egg problem with a full-blown compiler written
in its own language.

Doug

> >Speaking of TMG, is there an implementation for FreeBSD/Mac/Linux?  Or do
> > I have to find a CDC/PDP-7 emulator first? :-)
> >
> >-- Dave
> 
> TMG is mentioned in the v3 manual:
> 
> /sys/tmg/tmgl.o -- the compiler-compiler
> 
> There's no files for it for v5 but it is in v6 and it seems to
> disappear after that.
> On TUHS V6/usr/source/tmg/tmgl.t would seem to be a source file.
> 
> I did manage to get something running for pdp-7 on simh and got to the
> GA prompt.
> Didn't get it to do much beyond printing "CAB DECSYS7 COPY   15 JUNE 1966"
> 
> Mark



^ permalink raw reply	[flat|nested] 17+ messages in thread
* [TUHS] TMG and B
@ 2014-09-30  0:58 Noel Chiappa
  2014-09-30  1:01 ` Larry McVoy
  0 siblings, 1 reply; 17+ messages in thread
From: Noel Chiappa @ 2014-09-30  0:58 UTC (permalink / raw)


    > From: Doug McIlroy <doug at cs.dartmouth.edu>

    > Sorry for straying from direct Unix history

Au contraire. This was a fascinating account, and very valuable to have it
noted down for history. Please stray like that anytime you feel like it! :-)

	Noel



^ permalink raw reply	[flat|nested] 17+ messages in thread
* [TUHS] TMG and B
@ 2014-09-29 15:24 Doug McIlroy
  2014-09-29 18:30 ` scj
  0 siblings, 1 reply; 17+ messages in thread
From: Doug McIlroy @ 2014-09-29 15:24 UTC (permalink / raw)


scj wrote:

> There was a compiler/compiler in use at the Labs, imported I think by Doug
> McIlroy, called TMG.

Sorry for straying from direct Unix history, but this remark spurred a lot
of memories.

TMG (from "transmogrify", defined in Webster as "to change or alter, often
with grotesque or humorous effect") was imported from Bob McClure, erstwhile
Bell Labs person, then at Texas Instruments. And an interesting import
job it was. McClure had written TMG for the CDC 1604 in machine language. He
sent me green coding sheets hand-transliterated into 7090 code. Interesting
debugging: one knew that the logic of the code was sound, but the opcodes
might not always be right. Sometimes, for example, the wrong one of the two
accumulator-load instructions, CLA and CAL, was used.

Clem Pease converted TMG to the GE 635 for Multics by the artifice of defining
7090 opcodes as 635 macros--sometimes many instructions long to slavishly
emulate the 7090's peculiar accumulator (which mixed 38-bit sign-magnitude
with 37-bit twos-complement and 36-bit ones-complement arithmetic). It's
amusing to speculate about the progressive inflation of TMG had McClure sent
me a similar translation for the 7090.

TMG had a higher-level language written in TMG, which evolved during the
Multics project into something considerably more elaborate than McClure's
original, including features like syntax functions, e.g. seplist(a,b) denoted
a sequence of a's separated by b's, for arbitary syntactic categories a and
b. Syntax functions took TMG beyond the domain of context-free languages.

Multics was to be written in PL/I, a compiler for which was commissioned from
Digitek. They had brilliant Fortran technology, but flubbed PL/I.  When it
appeared that the Digitek compiler was hopeless, Bob Morris proposed that
we write a quick and dirty one in TMG. Despite being slow (an interpreter
running on an emulated 7090) and providing only three diagnostics, this
compiler carried the project for a couple of years.

When Unix came along, we were again faced with how to bootstrap TMG across
machines. This time I wrote a bare-bones interpreter in PDP7 assembler, then
by stages grew the language back to the Multics state. Ken, in a compliment
I still treasure, once called this the most amazing program on the original
Unix machine.

I believe TMG was involved in the initial evolution of B, but the
real tour-de-force in B was the ability of an interpreted version to
exploit software paging and transcend the limited memory of the PDP-11.
The following scenario  was to be repeated several times in the early days
of Unix.  When the native version of B ran out of steam, the interpreted
version would be used to introduce some new optimization that would squeeze
the native version back to fit. (Bigger input, smaller output!) Subsequently
we saw the same thing happen with C and the kernel.  When the kernel grew
too big, a new optimization would be introduced in C to squeeze it. (And to
squeeze the compiler, too. The compiler, though, never enjoyed B's advantage
of being able temporarily to run in a bigger arena.)

Doug




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

end of thread, other threads:[~2014-10-01 20:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-30 13:52 [TUHS] TMG and B Noel Chiappa
2014-09-30 14:32 ` Clem Cole
2014-09-30 17:44 ` Dave Horsfall
2014-09-30 21:26   ` Dave Horsfall
2014-09-30 22:52     ` Mark Longridge
2014-10-01 20:33       ` Dave Horsfall
2014-09-30 20:08 ` John Cowan
2014-09-30 21:07   ` SPC
2014-09-30 21:15     ` Dave Horsfall
  -- strict thread matches above, loose matches on Subject: below --
2014-10-01 14:04 Noel Chiappa
2014-10-01 13:53 Doug McIlroy
2014-10-01 20:23 ` Dave Horsfall
2014-09-30  0:58 Noel Chiappa
2014-09-30  1:01 ` Larry McVoy
2014-09-30  8:52   ` arnold
2014-09-29 15:24 Doug McIlroy
2014-09-29 18:30 ` scj

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).