In the open access laid out the program for the lunar mission “Apollo 11”

In the open access laid out the program for the lunar mission “Apollo 11”

When the engineers of the laboratory of measuring instruments of mit in the 1960-ies started to develop software for the lunar mission, the necessary technology did not exist. The experts had to invent them. Now the software’s code is available on GitHub, and it’s a real time capsule, writes Quartz.

Achievements of the laboratory measuring devices

The instrumentation laboratory of MIT was founded in 1932 by the brilliant Charles stark Draper, the father of inertial navigation. In 1973 it was renamed in honor of the founder and is separated from the Institute. Now the Draper laboratory is a non-profit organization and is engaged in research in various fields of space exploration, national security, energy and health.

Developing software for flight to the moon, and laboratory experts have created a new way to preserve computer programs, called “rope memory” (rope memory). The memory of the new type were capable of storing 2.5 MB of data in the media volume of 1 m3, equivalent, analogues, previously existed only 140 KB.

In addition, engineers at MIT have developed a special version of the programming language assembler. For many modern programmers use Assembly language incomprehensible to himself. It’s hard to read extremely difficult to debug. Besides, what makes a particular piece of code, to understand difficult. Today programming is done in high level languages, and insert the assembler code that directly accesses device resources may be present to optimize program with CPU registers, memory, etc.

Assembler is a language for machines, not for people

On the spaceship “Apollo-11” system was installed for the Apollo Guidance Computer (AGC). MIT programmers wrote thousands of lines of “esoteric” code in assembler to get the machine to perform all the necessary calculations.

To understand how much code was written, the resource brings a photo of Margaret Hamilton, the Director of the software engineering division testing laboratory of MIT, next to a stack of printouts of the code. She was about 30.

By the way, Hamilton is in his 80s continues to do research. And that she, along with colleagues in 1969 prevented the failure of the landing “Apollo 11″moon — three minutes before landing, the computer was overloaded with incoming data, but experts have found a solution to the problem.

Code that has been manually recovered

The code for AGC first laid out in open access in 2003. Technical researcher Ron Burke has transcribed them from the originals MIT and scored manually every thousand lines of code. The fact that the Institute has uploaded the scanned space that were partially damaged, and sometimes the code is not read. Burke had to work hard to repair the gaps in the code.

Scanning of code sheets involved and pilot Gary Neff of Colorado. When Burke found out about this, he asked the Neff version of the scanned programs. The researcher was happy when found out that is 100% true added the missing pieces.

The work Burke has made the program code for the “Apollo-11” available for other researchers. In addition, the specialist has created the AGC simulator to verify the code:

Although the project burkey was a huge success, some code fragments were not clear to the modern developers. July 7, a former NASA Intern Chris Harry downloaded the software in the GitHub repository, making it available to a wide circle of specialists and enthusiasts.

Several hours later, programmers began to dissect the program, and to explore comments left in the code for the MIT experts. Most often, the comments explained what makes a particular piece of the program. But sometimes they made the process of learning hundreds of lines of ASM and not so dull.

In the program code found funny jokes and references to events of the 1960s

For example, one of the code files called BURN_BABY_BURN—MASTER_IGNITION_ROUTINE (this can be translated as “burn, baby, burn — the program of the master light”). The first comment explained it:

This refers to the 1965 riots in Los Angeles (watts, about the uprising in the suburbs of Los Angeles, against racial segregation), and was inspired by an extraordinary disc jockey and radio station owner Magnificent Montague. Magnificent Montague used the phrase “burn, baby! BURN!”, when spinning the hottest new records. Magnificent Montague was the charismatic voice of soul music in Chicago, new York and Los Angeles from mid-1950s to mid-1960s.

In this routine about 900 rows in the first and last review of the code can be considered a kind of game offered by the team of programmers — greeting and farewell:

In the file called LUNAR_LANDING_GUIDANCE_EQUATIONS.s (it can be translated as “equation to control the moon landing”) two lines, presumably, were temporary, however, included in the final version of the program:

In the same file there is a comment which says to the astronaut “back to this nonsense back”:

Burke explained:

This code is all about positioning the antennas for a touchdown. I believe he shows the code to warn astronauts about the need to adjust its position.

And in the file PINBALL_GAME_BUTTONS_AND_LIGHTS.s (“buttons and lights to play pinball”), which is described as “a systematic program to screen and keyboard for communication between AGC and the operator of the computer” is a kind of quotation from Shakespeare — a fragment of the seventh scene of the fourth act of the second part of “Henry VI” (although the code specifies that the fragment of the sixth scene of the second act):

Your eyes prove that you there are people who only say that on nouns but on verbs, and all such filthy words which were unbearable to hear Christian.

It’s like a reference to the programming language AGC, noted one Reddit user. The language uses a predefined “nouns” and “verbs” for performing operations. For example, the verb number 37 means “to run the program, and the noun for number 33 — “time of fire”.

Now the programmers are already well studied code and have been able to identify problems, which are likely to arise from Apollo 11. For example, problems have arisen in the operation of mixing in cryogenic tanks and power circuits.

One user suggested that something is wrong not with the code — the problem is caused by something else. Blame not the program, and the Moon. Perhaps on a different satellite problems during landing would not have arisen:

Another sent him to the basics, you could just turn off and turn on the computer:

Another developer suggested that perhaps just need to update the software. Apollo 14 all fixed: