Elara S. Novikova
Iskra-226

DEPTH CHARGE

Глубинная бомба

David Ahl, 1973

An 8x8x8 cube of ocean, one submarine somewhere inside it, six salvos. After each miss the machine names directions and nothing else: east or west, north or south, deeper or shallower. There is no map, no grid on the screen, not one picture. You hold the cube in your head or you lose it.

sectors
20-23
source lines
69
salvos
6
One salvo into a cube eight by eight by eight, and the three corrections that come back: further east, further south, deeper.
One salvo into a cube eight by eight by eight, and the three corrections that come back: further east, further south, deeper.

Run this disk · The image, 256,256 bytes

Why this one matters

DEPTH CHARGE came through the same 1973 collection as BAGELS, and it was a fixture in school computing rooms for one reason: it is binary search wearing a uniform. The submarine is a number in three parts, the salvo is a probe, and the answer tells you which half of each axis to throw away. Nobody had to explain that. Children worked it out by playing badly for twenty minutes and then playing well. Games like this taught more people about search than any lesson did, because losing six salvos in a row is a better argument than a blackboard.

Three dimensions without a picture

The Iskra-226 is a character terminal. Not one graphics atom shows up anywhere in the corpus I decoded, so a program that wants to be three-dimensional has exactly one honest option, which is to describe. ГЛУБЖЕ and МЕЛЬЧЕ, deeper and shallower, are the third axis, and they work because the player builds the cube. Six salvos against 512 cells sounds cruel until you work it out: a miss reports on all three axes at once, and eight values per axis need three halvings. Three well placed salvos are enough. Six is generous.

What it cost the interpreter

DEPTH does very little by itself. Before it offers the first salvo it calls out six times to two subroutines, one for the generator and one for truncation, and every one of those calls has to come back. A program built that way does not survive a wrong RETURN. The classics pack is where I learned that the token is 0x5E and not 0x2D, which turns out to be LOAD. A decoder can carry a mistake like that for months with nothing looking broken. An assembled program that has to actually run cannot.

What this disk is not

None of this was dug up. The disk was written in 2026, in a dialect I decoded from six recovered sides, using an assembler I wrote for the purpose. The mechanic is common property and has been since the seventies. The Russian code is mine, line by line, and there is no Soviet games disk behind it. I say that on every one of these pages because the alternative is that someone eventually cites an invention as a source, and everything else I have written about this machine goes down with it.

What I checked

DEPTH, a miss at (4,4,4) against target (6,0,5) returns "ВОСТОЧНЕЕ / ЮЖНЕЕ / ГЛУБЖЕ", then the sinking.

What this does not show

The seed is fixed at 37, because no clock or timer atom is attested, so the submarine sits in the same cell on every run and the game is solvable from memory the second time. What is tested is the emulator, not the hardware; the bytes follow the attested rules, and only a test on a surviving Iskra-226 could show whether real firmware accepts them.

Where to read more

The source

DEPTH.bas, 69 lines, assembled onto the image with iskra_asm.py

69 lines of BASIC
10 REM DEPTH CHARGE
20 PRINT "*** ГЛУБИННАЯ БОМБА ***"
30 PRINT "ПОДЛОДКА В КУБЕ 8Х8Х8."
40 PRINT "ВВОДИТЕ X, Y, ГЛУБИНУ."
50 V50 = 37
60 GOSUB 900
61 V61 = V50 / 13
62 GOSUB 950
63 V01 = V60
64 GOSUB 900
65 V61 = V50 / 13
66 GOSUB 950
67 V02 = V60
68 GOSUB 900
69 V61 = V50 / 13
70 GOSUB 950
71 V03 = V60
80 V10 = 0
100 V10 = V10 + 1
110 IF V10 > 6 GOTO 700
120 PRINT "--- ЗАЛП";V10
130 INPUT V04
131 INPUT V05
132 INPUT V06
140 IF V04 = V01 GOTO 150
141 GOTO 200
150 IF V05 = V02 GOTO 160
151 GOTO 200
160 IF V06 = V03 GOTO 600
200 PRINT "МИМО."
210 IF V04 < V01 GOTO 215
211 GOTO 220
215 PRINT "ВОСТОЧНЕЕ"
216 GOTO 230
220 IF V04 > V01 GOTO 225
221 GOTO 230
225 PRINT "ЗАПАДНЕЕ"
230 IF V05 < V02 GOTO 235
231 GOTO 240
235 PRINT "СЕВЕРНЕЕ"
236 GOTO 250
240 IF V05 > V02 GOTO 245
241 GOTO 250
245 PRINT "ЮЖНЕЕ"
250 IF V06 < V03 GOTO 255
251 GOTO 260
255 PRINT "ГЛУБЖЕ"
256 GOTO 100
260 IF V06 > V03 GOTO 265
261 GOTO 100
265 PRINT "МЕЛЬЧЕ"
266 GOTO 100
600 PRINT "*** ПОТОПЛЕНА С";V10;" ЗАЛПА! ***"
610 END
700 PRINT "*** ПОДЛОДКА УШЛА ***"
710 PRINT "ОНА БЫЛА В";V01;V02;V03
720 END
900 V50 = V50 * 21
910 V50 = V50 + 13
920 IF V50 < 100 GOTO 940
930 V50 = V50 - 100
935 GOTO 920
940 RETURN
950 V60 = 0
960 IF V61 < 1 GOTO 990
970 V60 = V60 + 1
980 V61 = V61 - 1
985 GOTO 960
990 RETURN

Back to Iskra-226