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:
- V35E (VERB, 3, 5, ENTR) - dashboard test. Note that after performing the operation, the PROG indicator does not light up. This emulator bug inherits from Virtual AGC.
- V16N65E or V16N36E shows the time since the computer was turned on. The first line shows the hours, the second - minutes, the third - seconds.
- If the time from the moment of loading the simulator is annoying, then you can set the real time by entering V25N36E. Then you can enter hours in R1, in minutes - in minutes, in R3 - seconds. When entering, you should put + in front of the number, so the computer separates the octal numbers from the decimal. Enter five digits, including three zeros before the time. After completing the input of each line, you should press ENTR. When entering seconds it is necessary to take into account that seconds are entered with an accuracy of hundredths, therefore for entering 35 seconds you need to enter +03500. At the end of the input, the system can ask the KEY REL lamp to return it the opportunity to use the display to display data, which should be done by pressing the button of the same name.
- V37E00E (note: 00 is not a noun, after entering V37, ENTR is pressed, 00 is entered and ENTR is pressed again) to start the idle program in which the emulated computer consumes the 15 watts.
- V91E will show the checksum of memory banks. The first number on the screen will be a checksum, the second - the bank number, the third - the bugger word (the developers have done a little with this name). Use the PRO button to switch to the next data bank. Please note that bugger word bank 6 is 05143, which indicates the loaded program Colossus 249. If Artemis 072 were used, this number would be equal to 04275.
After this acquaintance with the interface, it's time to go to the moon.
- Click the Enable IMU button. Give 85—90 seconds to spin up the gyroscopes and start other parts of the system.
- After NO ATT goes out, enter V37E01E (VERB, 3, 7, ENTR, 0, 1, ENTR). Mode 01 will be loaded, which is intended to prepare for the launch of a rocket or the initialization of services. PROG will display 01, if this does not happen, try again after a while.
- Wait for the calibration of the gyrostabilizer (setting the pitch, pitch at a value close to 90 °). The mode of operation will be automatically changed, and PROG will show 02.
- Click the Launch button to start. The flight time will begin, Mission Elapsed Time (MET). After launching, PROG will switch to 11, the launch mode.
- DSKY will display the numerical values (from top to bottom) of speed in feet per second (to quickly convert to meters, multiply by 3 and divide by 10), the rate of change of height in feet per second and the height above the launching table in nautical miles (1 nautical mile = 1852 m). The format of the latter is XXXX.X, that is, the real values are ten times lower than those displayed.
- Engines will run for 11 minutes 44 seconds. Pitch and rotation control programs will be performed.
- At any time, you can track the parameters of the orbit by the introduction of V82E. The values from top to bottom are the heights of the apocenter and pericenter in nautical miles in the format XXXX.X, the time to free fall in the format XXXX, where the first two numbers are hours, the second two are minutes. To return to speeds and altitude, press PRO.
- After a successful launch, the apocenter and pericenter must be above 90 nautical miles.
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 .