Re: Compiler and interpreter origins

"Nick Roberts" <>
9 Aug 2004 00:28:14 -0400

          From comp.compilers

Related articles
Compiler and interpreter origins (Lauri Alanko) (2004-07-28)
Re: Compiler and interpreter origins (Jeff Kenton) (2004-08-04)
Re: Compiler and interpreter origins (Dick Weaver) (2004-08-05)
Re: Compiler and interpreter origins (glen herrmannsfeldt) (2004-08-05)
Re: Compiler and interpreter origins (Rodney M. Bates) (2004-08-09)
Re: Compiler and interpreter origins (Nick Roberts) (2004-08-09)
Re: Compiler and interpreter origins (2004-08-09)
Re: Compiler and interpreter origins (John Slimick) (2004-08-09)
Re: Compiler and interpreter origins (Martin Ward) (2004-08-10)
Re: Compiler and interpreter origins (Scott Moore) (2004-08-10)
Re: Compiler and interpreter origins (2004-08-11)
Re: Compiler and interpreter origins (Dave Thompson) (2004-08-23)
[3 later articles]
| List of all articles for this month |

From: "Nick Roberts" <>
Newsgroups: comp.compilers
Date: 9 Aug 2004 00:28:14 -0400
Organization: Compilers Central
References: 04-07-077 04-08-010
Keywords: history
Posted-Date: 09 Aug 2004 00:28:14 EDT

On 4 Aug 2004 02:44:48 -0400, Jeff Kenton <>

> Lauri Alanko wrote:
>> Firstly, back when everything was done in pure machine code or
>> assembly, how common was the use of self-modifying code?
> Very common. ...

Indeed, I think in the /very/ early days of computing, when no machine
had more than one or two KB of memory*, it was generally necessary for
any practical program to do a lot of self-modification, as well as a
great deal of the loading of segments of code from the drum*.

It became a considerable art, squeezing functionality out of code that
could fit into such a tiny amount of memory. Unfortunately, it also
caused an assumption in the industry, one that lasted far too long,
that such self-modification was an acceptable technique.

Originally, the COBOL language had an


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.

Unfortunately, I think things have swung too far the other way, in
that even the humble GOTO is now considered verboten. Silly.
Nick Roberts

*Memory those days was 'core' memory, a three-dimensional wire grid
with a magnetic 'core' (a ring made from ferrite) around each triple
intersection. Each core stored one bit. It was a truly daft piece of
technology (by today's standards), but a fascinating work of art to
look at.**

*In those days, the fastest secondary storage device was a 'drum',
which was a rotating drum covered in magnetic material (like a disk),
with a read/write head that scanned from end to end. The last
generations of drums had multiple heads, and were very fast.***

[** - The more modern ones had core. Some of the earlier ones used
Williams tubes, CRTs that stored data (very unreliably) by the
presence or absence of spots on the CRT, or mercury tank or
magnetorestrictive delay lines which worked better but were hard to
program since you wanted to minimize the amount of time the comptuter
spent waiting for words to come around. Some computers like the
Electrodata 205, LGP 30, and IBM 650 ran straight off the drum. Core
was by comparison pretty simple, although you had do do strange things
to make big fast core banks, like sitting them in tanks of cooling oil
in the IBM 7094. Typical core banks were 2 1/2 D (X, Y, and sense
wire) rather than 3D.

*** - Yup. The 650's drum in the mid 1950s spun at about 12K rpm,
a speed that disks have only recently matched. -John]

Post a followup to this message

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