Related articles |
---|
Compiler and interpreter origins la@iki.fi (Lauri Alanko) (2004-07-28) |
Re: Compiler and interpreter origins Jeffrey.Kenton@comcast.net (Jeff Kenton) (2004-08-04) |
Re: Compiler and interpreter origins rweaver@ix.netcom.com (Dick Weaver) (2004-08-05) |
Re: Compiler and interpreter origins gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-08-05) |
Re: Compiler and interpreter origins rbates@southwind.net (Rodney M. Bates) (2004-08-09) |
Re: Compiler and interpreter origins nick.roberts@acm.org (Nick Roberts) (2004-08-09) |
Re: Compiler and interpreter origins nmm1@cus.cam.ac.uk (2004-08-09) |
Re: Compiler and interpreter origins slimick@venango.upb.pitt.edu (John Slimick) (2004-08-09) |
Re: Compiler and interpreter origins Martin.Ward@durham.ac.uk (Martin Ward) (2004-08-10) |
Re: Compiler and interpreter origins samiam@moorecad.com (Scott Moore) (2004-08-10) |
Re: Compiler and interpreter origins beliavsky@aol.com (2004-08-11) |
Re: Compiler and interpreter origins david.thompson1@worldnet.att.net (Dave Thompson) (2004-08-23) |
Re: Compiler and interpreter origins jeremy.wright@microfocus.com (Jeremy Wright) (2004-08-25) |
Re: Compiler and interpreter origins torbenm@diku.dk (2004-09-03) |
[1 later articles] |
From: | John Slimick <slimick@venango.upb.pitt.edu> |
Newsgroups: | comp.compilers |
Date: | 9 Aug 2004 01:16:32 -0400 |
Organization: | University of Pittsburgh |
References: | 04-07-077 04-08-023 |
Keywords: | history, comment |
Posted-Date: | 09 Aug 2004 01:16:32 EDT |
Dick Weaver wrote:
> There was a language TRAC (Deutsch?) for the PDP-1 where the a program
> could modify itself (I think).
This isn't about TRAC, but (1967 or so) I spent a month trying to
understand the core of the Thor timesharing system for the PDP-1
written in PDP-1 assembler. I understood it all except for one place
where, in the code, in one location either of two data words would be
stored. One word was a "SZA" ("skip on zero accumulator") and the
other was a "SNA" ("skip on non-zero accumulator"). Why would anyone
modify a skip instruction? It was explained to me later that the code
had to be self-modifying. I swore that I would never write
self-modifying code, and I have kept my promise for 37 years. (And I
remember quite clearly who wrote that code, but I bet he doesn't
remember doing it.)
Klaus Wirth used to go off on self-modifying code; he
considered it a terrible evil.
john slimick
slimick@pitt.edu
[I missed the reference to Trac, a language in which I've probably
written more code than anyone. It's a strictly interpretive macro
expansion language somewhat similar to Unix m4, so just about anything
you write is by some standard self-modifying code. The code I wrote
didn't do much self-modifying beyond putting commas into arguments to
recursive routines to implement variable length argument lists and
poor man's structures. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.