📜 ⬆️ ⬇️

Apollo Computer Emulator Moonjs

Run to the moon is possible from the browser due to the port on JavaScript


Moonjs is a small emulator of the Apollo spacecraft onboard computer.

This program was not created from scratch, it is just a port of Virtual AGC written in C by Ronald Burke's JavaScript using asm.js and the Emscripten compiler.

The computer does not have its own special name, most often it is called AGC after the first letters of the Apollo Guidance Computer. The instance was installed in the command and lunar modules. For the first time, AGC was commissioned in August 1966, and its use was abandoned in July 1975.

The computer operates at a frequency of 2.048 MHz (the main one, however, is 512 kHz) and has 2048 RAM (in earlier versions - 1024) 16-bit words, with one of these bits being parity, so only 15 are available for use. bit. ROM volume was 36864 words, in the early version - 24576.
')
4 16-bit registers were used: one for basic calculations, one for the instruction counter, one for the remainder for executing the DV command or the return point address for the unconditional jump and one for the younger part of the product when multiplying. Because of the parity bit and the overflow bit, only 14 bits were available for use.

The mass of AGC without control panels is about 32 kg, it consumed about 70 watts of power when operating from a 28-volt direct current network and exactly 15 watts idle.

For the first time integrated circuits were used, the logic was resistor-transistor. Despite the outward modesty of the indicators, this computer was able to deliver 12 people to the surface of the Moon and return them back.

The software was written in assembly language. A simple operating system implemented multitasking with the execution of up to 8 tasks, while one of them was always present with the lowest priority - it was created for the operation of a computer activity light.

For astronauts, AGC looked like an eight-kilogram DSKY panel with seven-segment indicators, signal lights and buttons of a small keyboard through which input was made.



It's funny that the data was stored in the metric system, but displayed to astronauts in more common feet and miles in the USA.

Commands are entered in the form of two two-digit numbers, which are called verb (verb) and noun (noun). As the names imply, the verb points to the operation, and the noun points to the data area. The display was controlled by a relay, which slowed down the update. In later models, this part already worked on semiconductors.

A complete list of all verbs and nouns can be found in section 4.4 of the second volume of the operator’s manual . But in order to play a little with the emulator , it's useless.



Commands are given as a sequence of the form V35E or V16N65E. E means pressing the ENTR button, V - VERB (verb), N - NOUN (noun).

Simple operations:


After this acquaintance with the interface, it's time to go to the moon.



The emulator is available at http://svtsim.com/moonjs/agc.html . More interesting teams and job descriptions in English are on the Virtual AGC page . Documentation of the work of the Apollo programs is available to everyone .

Source: https://habr.com/ru/post/364553/


All Articles