Re: Compiler and interpreter origins

Jeremy Wright <jeremy.wright@microfocus.com>
25 Aug 2004 14:55:20 -0400

          From comp.compilers

Related articles
[6 earlier articles]
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)
Re: Compiler and interpreter origins gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-09-07)
| List of all articles for this month |

From: Jeremy Wright <jeremy.wright@microfocus.com>
Newsgroups: comp.compilers
Date: 25 Aug 2004 14:55:20 -0400
Organization: Micro Focus
References: 04-07-077 04-08-010 04-08-033 04-08-108
Keywords: history
Posted-Date: 25 Aug 2004 14:55:20 EDT

Dave Thompson wrote:
>
> On 9 Aug 2004 00:28:14 -0400, "Nick Roberts" <nick.roberts@acm.org>
> wrote:
>
> > On 4 Aug 2004 02:44:48 -0400, Jeff Kenton <Jeffrey.Kenton@comcast.net>
> [ asked about selfmodifying code in the Good Old Days ]
>
> > Originally, the COBOL language had an
> >
> > ALTER x TO PROCEED TO y
> >
> > statement, which modified a GOTO statement (itself labelled x),
> > changing its destination from whatever it was before to y. As you can
> > imagine, programmers could -- and generally did -- achieve the most
> > spectacularly obfuscated code with this statement. It became quite
> > notorious, and quickly became deprecated and then removed from
> > compilers altogether.
> >
> ALTER and "GO TO dot" are/were still in the 1985 standard, although
> deprecated; [ snip ] as you indicate it should be
> violently shunned by all right-thinking programmers.


Unfortunately, compilers have to support programs written by
wrong-thinking programmers.


ALTER need not be implemented using self modifying code. The set of
targets that an alterable goto can be set to is known at compile time.
The alterable goto is then just an indexed jump, and the alters set
the index.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.