11
$\begingroup$

I found a brochure by Raytheon about the Apollo Guidance Computer.

enter image description here

A compiler was announced for the AGC.

As far as I know the AGC was programmed in assembler only. What kind of high level language was used with this compiler? Was it used anytime for any later project? Was this compiler ever delivered to a costumer and used for a project?

$\endgroup$
6
  • 3
    $\begingroup$ "Compilers and assemblers are available to assist the programmer in the preparation of progams". So the AGC itself works with an assembler ( you can verify that by its instruction repertoire), but for "off-line assistance there are other compilers and assemblers. That 's what my "interpreter" tells me. :). I think at that time Fortran was the scientific programming language. $\endgroup$
    – Cornelis
    Commented Feb 2, 2022 at 18:27
  • 3
    $\begingroup$ @Cornelis Also since the final page of that brochure is annotated 12-65 I think that one has to be careful about assuming that "compiler" had its current meaning. $\endgroup$ Commented Feb 3, 2022 at 8:42
  • 1
    $\begingroup$ Looking for a reliable source, but I believe @MarkMorganLloyd is on the mark... "compiling" had more to do with collating and crossreferencing symbols between the different source modules, not translating a higher-level language to assembly. $\endgroup$
    – hobbs
    Commented Feb 3, 2022 at 18:55
  • $\begingroup$ @MarkMorganLloyd Why would it not have its current meaning ? Read the history of compilers, they were very common in the ninetheen sixties for COBOL and FORTRAN. $\endgroup$
    – Cornelis
    Commented Feb 4, 2022 at 12:15
  • 1
    $\begingroup$ @Cornelis I am intimately familiar with the history of compilers and related tools, and have been involved with them in various roles for decades. From the POV of the industry, I would point out that despite IBM promoting COBOL, FORTRAN and other high-level languages from the late-50s onwards they failed to convince a substantial proportion of their customers until the 90s: hence "very common" is not a convincing metric. From the POV of SE procedure, I cautioned that a particular assumption might be unsafe and it's entirely up to members of the community to heed or ignore that as they choose. $\endgroup$ Commented Feb 4, 2022 at 21:33

3 Answers 3

21
$\begingroup$

I can only speak regarding the high level programming which was at that time exclusively done using FORTRAN (Formula Translating System). I did work on Apollo and all scientific calculations that I ever saw were written in FORTRAN. Fortran is still used today in heavy numerical work; Python, for example, is relatively slow.

$\endgroup$
7
  • 21
    $\begingroup$ Sir.. You worked on Apollo!!?? In that era? $\endgroup$
    – zephyr0110
    Commented Feb 3, 2022 at 3:51
  • 2
    $\begingroup$ FORTRAN was the most common, but it was hardly universal. There were many languages around. In particular, JOVIAL was the language of choice for many embedded aerospace systems like this. FORTRAN, designed for heavy duty numerics, was not a good choice for embedded programming. en.wikipedia.org/wiki/JOVIAL $\endgroup$
    – John Doty
    Commented Feb 3, 2022 at 15:31
  • 3
    $\begingroup$ This answer is confusing. You're claiming you saw AGC code that was compiled using FORTRAN? Or that you worked on Apollo more generally and saw some FORTRAN code being used on the project elsewhere (ie: on mainframes, etc)? Are you aware of FORTRAN code being compiled specifically for the AGC? This seems to contradict other reliable sources... $\endgroup$
    – J...
    Commented Feb 4, 2022 at 13:38
  • 3
    $\begingroup$ As said, I can only respond re: the question about the high level language in use at the time. All code I saw and was involved with was fortran. I only had involvement with scientific calcs, I had no experience with the AGC. The purpose of a compiler is to reduce code written in a high level language to machine/assembly instructions. I think the AGC code was written in assenbly. I would look to some of the MIT docs as they were the key developers of the AGC $\endgroup$
    – tckosvic
    Commented Feb 4, 2022 at 14:32
  • 1
    $\begingroup$ @tckosvic Ok, that makes more sense. The question is asking specifically about the AGC so this answer seems to read as though you're implying that you yourself were working on the AGC and that you saw FORTRAN code compiled for it, which makes it a bit misleading given that every other source available suggests the programs written for the AGC itself were written strictly in assembly. This doesn't really answer the question, then, and is more of an interesting sidenote. $\endgroup$
    – J...
    Commented Feb 4, 2022 at 14:42
13
$\begingroup$

From this answer from @Mike Dunlavey:

The guidance computers for the command module and lunar landing module were each programmed in their own assembly language. The missions were exhaustively simulated on a large IBM 360 Model 75 computer, using a language called MAC-360 created by Hal Laning. It resembled Fortran in being mostly about mathematical calculations. It had a 3-line format for representing vector and matrix calculations.

From this answer from Mark Shulmann to the question "Why wasn't the Apollo 11 code written in higher programming languages like Fortran or COBOL?" asked on Quora:

The major reason was that compilers at the time did not generate code that was anywhere close to being as memory-efficient as what a programmer could produce in assembler (machine code).

The keypoint is that even with 36K, the programmers and hardware designers had to pull some crazy tricks to get the software to fit into the available memory. If they had used a high-level language, they likely would have needed far more memory to hold the software.

Finally, as Tony Flury points out in his answer, the AGC was a custom-designed architecture. There were no FORTRAN, COBOL, or ALGOL compilers available for it. If the software designers had wanted to use a high-level language, they would have had to write their own compiler for the AGC.

(Emphases by me)

Conclusion: mission simulations were exhaustively done using high-level language(s), but the program that ran on the AGC itself was written in assembly language and thus no compiler for this computer alone was needed.

$\endgroup$
5
$\begingroup$

I found some information at MIT :

enter image description here

Source

More about MAC in this MIT paper:

In 1953 the first version of 'George', the first algebraic compiler was finished.

'George' led to the devlopment of IBM FORTRAN by John Backus.

'MAC' evolves from 'George'.

enter image description here

enter image description here

So the compiler for AGC mentioned in the Raytheon brochure was designed for the MAC (MIT Algebraic Compiler) language. It was not used for Apollo, but it was offered for other applications of the AGC.

$\endgroup$
5
  • 1
    $\begingroup$ The AGC is the hardware computer, the software written for it was in assembly language, so there was no compiler for the AGC ! $\endgroup$
    – Cornelis
    Commented Feb 4, 2022 at 7:59
  • 1
    $\begingroup$ @Cornelis The software used in the AGC's of the Apollo CM and LM was written in assembly language but there was a MAC compiler too. The compiler was not used for Apollo but was offered for other applications of the AGC hardware. $\endgroup$
    – Uwe
    Commented Feb 4, 2022 at 8:33
  • $\begingroup$ Where did you read it "was offered for other applications of the AGC hardware" ? $\endgroup$
    – Cornelis
    Commented Feb 4, 2022 at 10:38
  • $\begingroup$ @Cornelis Look at the PDFs 1009.pdf, 1675.pdf, 1707.pdf and 1717.pdf at klabs.org/history/history_docs/mit_docs they look like an MIT report about Apollo parts. But the Raytheon paper at ibiblio.org/apollo/Documents/agc_brochure.pdf looks like a brochure to sell a product to new customers and not like a report of a NASA contractor. $\endgroup$
    – Uwe
    Commented Feb 4, 2022 at 14:11
  • $\begingroup$ The MAC compiler was used on the IBM -360 computer to translate all the test and simulations etc. programs into machine code, so I think it was used for the Apollo missions and yes indeed Raytheon offered the AGC for other applications but not the compiler for running programs on the AGC. In this way I read your comment. $\endgroup$
    – Cornelis
    Commented Feb 4, 2022 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.