7

In the early days of compilers, it was expected that programs would generally be stored in an inexpensive medium (such as punched cards or magnetic tape) when not in use. Although it was possible to construct hard-wired read-only memory, very few programs would represent a large enough fraction of a machine's workload to make doing so worthwhile.

By the time of the Apollo Guidance Computer, it was clearly established that there would sometimes be a need for computers which were purpose-built to run one particular program, but the software for the AGC was written in assembly language, rather than in FORTRAN or any other compiled language.

When would a compiler have first been used to generate code which was intended to be permanently built into a computer, or be used to a sufficient degree that having it some hard-wired medium (such as rope memory or electromagnetically-readable punched cards) would be more cost-effective than having it in RAM? Would any special accommodation have been needed to separate things that would be modifiable at run time from things that would not?

6
  • 1
    Considering the fuzziness of the question times the fuzziness of what computers and their components were at the time, I'd say Algol and the Zuse 22/23 machines. Except, that permanent program storage here a DRUM serving as main memory. Keep in mind, computing underwent evolution, only specializing later, so distinct feature taken as normal (like RAM/ROM) had themself to evolve to what we take as granted today AFTER computers were already existing.
    – Raffzahn
    Sep 24, 2021 at 16:25
  • 1
    In what sense would code on a drum be "read-only"? If code is run directly off the drum, I would expect the machine would also be able to modify it. If it's read into RAM and then executed, it wouldn't be running from RAM. If there were a machine that executed code directly from a magnetic-drum reader but required some other machine to write the drum, that would qualify for purposes of my question, but I don't know of any machines like that.
    – supercat
    Sep 24, 2021 at 17:09
  • The point is that 'read only' wasn't a feature present. Keep in mind, Read only isn't really why ROM has been used in the past, it's the ability to have all code/data accessible within the address space without loading it. In fact, read only is a disadvantage, only accepted due ROM being less expensive than Writable storage. Hence the move away from ROM toward FLASH nowadays. Code, stored durable within the address space to be executed in place. Same is true for a drum based machine - and as well for core based machines, which has eben used to deliver the same instant on.
    – Raffzahn
    Sep 24, 2021 at 22:41
  • 1
    @Raffzahn: The fact that ROM is incorruptible is for many applications an advantage over RAM. Even though core is nominally non-volatile, the act of reading it will corrupt it unless one is able to successfully write back the contents. Any transient read error will thus become a permanent read error.
    – supercat
    Sep 24, 2021 at 22:51
  • 2
    The question conflates 'ROM' and 'permanently stored'. The first time a compiler generated code to be stored in ROM was the first time that a compiler punched its object code onto paper tape or cards. OK, they're write-once media; I'm not sure that's all that different from writing via a ROM programmer. Sep 24, 2021 at 23:50

1 Answer 1

11

SAGE Missile Defense System, 1957

SAGE was a system of computers used by NORAD from 1957 to the 1980s. The hardware was designed by MIT Lincoln Laboratory, derived from their Whirlwind I computer, itself the first computer (1951) to have core memory. The CPU (AN/FSQ-7) of SAGE had two banks of core memory:

The FSQ-7 and -8 used core memory with 32-bit words plus a parity bit, operating at a 6-microsecond cycle time. Both machines had two banks of memory, memory 1 and memory 2 (Commonly referred to as Big Mem and little Mem). On the FSQ 7 memory 1 had 65,536 words and memory 2 had 4096 words.

Wikipedia

Drum memory was also used, due to the enormous size of the software. The hardware was manufactured by IBM. Each of the 24 installations used 2000 m2 of computer space weighing 250 tons and using 3 MW of electricity. The cost of the entire SAGE system (including non-computing elements such as radar) cost more than the Manhattan Project.

Whirlwind I's programs were written in assembly, so it does not qualify as an answer to this question. However, SAGE's programs were written in a variety of languages, which included several compiled languages:

The following paper is a description of the organization and techniques we used at MIT's Lincoln Laboratory in the mid-1950s to produce programs for the SAGE air-defense system. [p. 1]

We can compare the electronic-design phase with the development of basic programming techniques of translation, compilation, and interpretive routines. Scientific and engineering calculations have been assisted by the PACT and A-2 compiling systems, and commercial data processing by BIOR and B-0 (to name but a few). [p. 4]

Production of Large Computer Programs

A figure in that same paper shows that some compiled programs were targeted to core memory:

SAGE software process

4
  • Just a nit to pick: An assembler is a compiler, just for a (very) low level language.
    – vonbrand
    Sep 25, 2021 at 21:38
  • 2
    @vonbrand nitpick NOT accepted. "Assemblers are a third type of translator. The purpose of an assembler is to translate assembly language into object code. Whereas compilers and interpreters generate many machine code instructions for each high-level instruction, assemblers create one machine code instruction for each assembly instruction." - bbc.co.uk/bitesize/guides/zmthsrd/revision/1 Sep 25, 2021 at 22:25
  • 1
    I disagree. Assemblers assemble programs in the same way a human operator would do by hand. Doing a hand assembly can be a great exercise to illustrate the difference. Assemblers are not compilers.
    – Spud
    Sep 26, 2021 at 3:59
  • The answer doesn't make it obvious that any compiled code was written to ROM (or that SAGE had ROM). Core memory is normally writable, not a form of ROM. Was some of SAGE's core read-only? Oct 9, 2021 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .