The Apollo Guidance Computer had only 2k RAM and 32kb storage.

Also what O.S. did they use, and who made it?

  • 6
    $\begingroup$ You'd be surprised how much code in assembly you can squeeze into 32kb of storage, especially if you don't waste any resources on OS (just do without). $\endgroup$
    – SF.
    Aug 18, 2017 at 1:00
  • 2
    $\begingroup$ There is a lot of information readily available on this topic on the Internet, even on major sites like Wikipedia. Can you summarize the research you have already done, so just the parts you are missing can be filled in? $\endgroup$ Aug 18, 2017 at 2:02
  • 2
    $\begingroup$ There are plenty of embedded systems that still do not use an operating system. The controller in your microwave, for example. $\endgroup$ Aug 18, 2017 at 2:12
  • 1
    $\begingroup$ Very, very carefully. $\endgroup$
    – 0xDBFB7
    Aug 18, 2017 at 2:20
  • 1
    $\begingroup$ Early Space Shuttle flights carried an HP-41C calculator which could do all of the calculations needed for them to get home if the main computer failed. en.wikipedia.org/wiki/HP-41C#Use_on_the_Space_Shuttle I don't know exactly how many bytes of memory it had, but I think it was only a fraction of what the AGC had. $\endgroup$ Aug 18, 2017 at 18:39

1 Answer 1


The equations required for flight to the moon are not all that complicated, particularly given that much of the work was done by larger computers based on the Earth. Some of the computer programs (e.g. P40-P42) run on the Apollo guidance computer simply calculated what direction to point the ship and how long to fire the engine in order to achieve a change in course called for by Mission Control. Others (e.g. P51, P52) computed what the current orientation of the ship was based on what direction various stars were found.

The hardest real-time problem solved by the Apollo computers was probably the landing guidance itself -- pointing and throttling the engine on the Lunar Module over the course of several minutes in order to reach the surface of the moon at a low speed. The central equations for this guidance are not complex at all:

enter image description here

In fact, you could compute one iteration of the guidance loop by hand in a few minutes. The computer was fast enough to run the loop ten times a second, which was more than sufficient to control the lander.

The software was developed by a team at MIT led by Margaret Hamilton, whose work advanced the state of the art of software engineering significantly. The software was based around a simple real-time scheduling kernel for which "operating system" might be too grand a term.

Modern operating systems provide a vast array of complex facilities to software, most of which aren't needed by any single program. With no graphical display, audio output, network connection, disk I/O, support for software written for legacy systems, etc. it's not that difficult to keep a complete system in a few kilobytes.

You can read the assembly source code itself here. The EXECUTIVE module, for example, comes to about 500 lines of heavily-commented assembly, and the maneuvering subroutines P40-P47 come to about five times that.

I personally find the source code very difficult to follow, as the instruction set of the AGC has a very different flavor from that of the modern CPUs I'm more familiar with.


Your Answer

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

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