Elara S. Novikova
Iskra-226

LUNAR

Посадка на Луну

Jim Storer, 1969

Five hundred meters up, four hundred units of fuel, gravity pulling five a turn, and one number to type before each one. Jim Storer wrote this in the fall of 1969, months after Apollo 11, and he was seventeen years old. The Iskra prints ТЯГА (0-30) and waits for you to decide how much of the tank to spend now.

sectors
20-22
source lines
36
fuel
400 units
soft landing
impact speed under 6
The seventeenth turn, with the last altitude, speed and fuel reading above the touchdown. The lander came down at 5, which this program counts as a good landing.
The seventeenth turn, with the last altitude, speed and fuel reading above the touchdown. The lander came down at 5, which this program counts as a good landing.

Run this disk · The image, 256,256 bytes

Why this one matters

Jim Storer was a high school senior in Lexington, Massachusetts, and he wrote LUNAR on the school's PDP-8 in the fall of 1969. Nobody had landed on the moon until that July. He took the thing that had just happened and put it in a form where you have to do it yourself, one thrust setting per turn, against a fuel budget that runs out. A teenager invented an entire genre because he wanted to try the maneuver, and it spread the way everything spread then, as a listing somebody else typed back in.

What makes it hold up is that you can lose. The program does not steer for you and it does not soften the last hundred meters. Burn too early and you arrive with an empty tank at full weight; hold back too long and there is not enough left to stop you. The numbers do the judging and there is no arguing with them. This is where a generation found out that a machine can model something real and then let you fail at it, which is a different experience from being told an answer is wrong.

One number a turn, and a landing that had to exist

Each turn prints the turn number, altitude, speed and remaining fuel, then asks for a thrust between 0 and 30. Gravity adds 5 to your downward speed, the thrust takes half its value back off, and the altitude drops by whatever speed is left over. Ask for more than you have and you get what is in the tank. Touchdown under 6 is ОТЛИЧНАЯ ПОСАДКА, under 16 is hard but the crew walks away, and anything faster kills them. That is the whole program, thirty-six lines, and it is enough to make the decision hurt.

Before writing a line of it I ran the arithmetic to check that the game can be won at all. With 400 units of fuel a soft landing exists; with 120 it does not. That check is the reason the tank holds what it holds. Shipping a lander that no sequence of inputs can bring down safely would have been the worse mistake by a distance, because it looks exactly like a working game until somebody good enough plays it, and at that point the disk is a lie about physics rather than a model of it.

What it cost the interpreter

Five hundred and four hundred are both numbers this BASIC cannot write down. Anything above 99 is read as a reference to a program line, so the altitude is built as fifty times ten and the fuel as forty times ten, on the two lines right after the banner. The rest is arithmetic any payroll program would recognize: one division, a subtraction, four comparisons at the end. In Russian, on a machine whose other disks compute wage tables, holding a lunar module at five hundred meters and asking what you would like to do about it.

What this disk is not

This disk was written in 2026. Storer's model is common property and versions of it have been rewritten thousands of times since 1969, but the code in this image is mine, written this year against a dialect reconstructed from the recovered disks. Nothing here was excavated. No Soviet games disk has ever surfaced, and if one ever does it will look nothing like this. Anyone who skips that sentence and takes the image for evidence ends up citing an invention, and then everything else on this project goes down with it.

What I checked

The verified winning sequence lands at impact speed 2.5 ("ОТЛИЧНАЯ ПОСАДКА"); doing nothing crashes at 70. The physics was checked numerically for winnability beforehand: with 400 units of fuel a soft landing exists, with 120 it does not.

What this does not show

This is a coarse model, and on purpose. Gravity is a flat 5 a turn, thrust converts at exactly half, and the ship does not get lighter as the tank empties, so a burn that works at the start works the same at the end. There is no fraction of a turn either: altitude steps whole and the loop stops once it has gone past the surface, which means the impact speed you are shown is the speed of the step that crossed the ground and not the speed at the ground. Thirty-six lines hold Storer's idea at the resolution this dialect can carry, not his equations. What is tested is the emulator, not the hardware; whether a surviving Iskra-226 would accept these bytes is unanswered.

Where to read more

The source

LUNAR.bas, 36 lines, assembled onto the image with iskra_asm.py

36 lines of BASIC
10 REM LUNAR LANDER
20 PRINT "*** ПОСАДКА НА ЛУНУ ***"
30 PRINT "ВЫСОТА 500 М. ТОПЛИВО 400."
40 PRINT "ТЯГА 0-30 ЗА ХОД. ТЯГОТЕНИЕ 5."
45 PRINT "МЯГКАЯ ПОСАДКА ПРИ СКОРОСТИ ДО 5."
50 V01 = 50
51 V01 = V01 * 10
60 V02 = 0
70 V03 = 40
71 V03 = V03 * 10
80 V04 = 0
100 V04 = V04 + 1
110 PRINT "--- ХОД";V04;" ВЫСОТА";V01;" СКОРОСТЬ";V02;" ТОПЛИВО";V03
130 PRINT "ТЯГА (0-30)"
140 INPUT V05
150 IF V05 < 0 GOTO 130
160 IF V05 > 30 GOTO 130
170 IF V05 > V03 GOTO 190
180 GOTO 200
190 V05 = V03
200 V03 = V03 - V05
210 V06 = V05 / 2
220 V02 = V02 + 5
230 V02 = V02 - V06
240 V01 = V01 - V02
250 IF V01 > 0 GOTO 100
260 PRINT "*** КАСАНИЕ ПОВЕРХНОСТИ ***"
270 PRINT "СКОРОСТЬ УДАРА";V02
280 IF V02 < 6 GOTO 320
290 IF V02 < 16 GOTO 340
300 PRINT "*** КРУШЕНИЕ! ЭКИПАЖ ПОГИБ ***"
310 GOTO 350
320 PRINT "*** ОТЛИЧНАЯ ПОСАДКА! ***"
330 GOTO 350
340 PRINT "*** ЖЕСТКО, НО ЭКИПАЖ ЖИВ ***"
350 END

Back to Iskra-226