Skip to content

Classic listings

David H. Ahl's BASIC Computer Games (Creative Computing, 1978) collected 101 type-in games and became, by 1979, the first computer book to sell a million copies: the type-in canon of a generation. Ninety-six of its programs are public domain today as transcribed by the coding-horror/basic-computer-games project (the Unlicense), and this site carries each of those transcriptions byte-for-byte, unmodified: original line numbers, original GOTOs, original 1978 spelling.

They are also d/BASIC's conformance corpus. Every listing below was compiled by the same d/BASIC compiler that runs in the playground, and the table reports exactly what happened. Nothing on this page is hand-written status.

89 / 96compile to DBC unmodified
85are interactive: they ask you questions in the console
55of those play to their natural end with a committed answer script
12of those reach a divergence the conformance ledger already names
4need no keyboard at all (1 never stops, by design)
7refused by name, with the line and the reason

Each listing was compiled and stepped for up to 2,000 bounded turns in the same WebAssembly compiler and runner the playground loads. Where the conformance suite carries a reviewed answer script for a listing, the script was fed to its INPUTs and the outcome recorded.

Run one now

These 4 need no keyboard. Each link loads the 1978 source into the playground and runs it.

Most of these games talk to you

85 of the listings are conversations: the program asks a question and waits. In the playground an answer row appears under the question; type your reply and press Enter. Where the conformance suite has a reviewed answer script for a listing, the script link shows one complete playthrough, and the table says whether the program reaches its natural end with it.

Every listing

Click Run to load the source into the playground and run it; when a program asks a question, answer it in the console. A refused listing opens with its diagnostic already on the console. source opens the original text, and script the reviewed answers the conformance suite feeds it.

# Game In the browser today Open Lines
01 Acey Ducey Plays · interactive Run · source · script 100
02 Amazing Interactive · stops at a known divergence Run · source · script 143
03 Animal Refused by name See the refusal · source 71
04 Awari Refused by name See the refusal · source 70
05 Bagels Plays · interactive Run · source · script 81
06 Banner Plays · interactive Run · source · script 94
07 Basketball Interactive · stops at a known divergence Run · source · script 196
08 Batnum Interactive · asks you Run · source 90
09 Battle Interactive · stops at a known divergence Run · source 196
10 Blackjack Interactive · asks you Run · source 321
11 Bombardment Interactive · stops at a known divergence Run · source · script 93
12 Bombs Away Plays · interactive Run · source · script 65
13 Bounce Interactive · asks you Run · source 53
14 Bowling Plays · interactive Run · source · script 101
15 Boxing Plays · interactive Run · source · script 142
16 Bug Interactive · stops at a known divergence Run · source · script 256
17 Bullfight Plays · interactive Run · source · script 193
18 Bullseye Plays · interactive Run · source · script 37
19 Bunny Runs Run · source 40
20 Buzzword Plays · interactive Run · source · script 26
21 Calendar Runs Run · source 58
22 Change Interactive · asks you Run · source 51
23 Checkers Refused by name See the refusal · source 82
24 Chemist Plays · interactive Run · source · script 27
25 Chief Plays · interactive Run · source · script 51
26 Chomp Plays · interactive Run · source · script 104
27 Civil War Plays · interactive Run · source · script 395
28 Combat Plays · interactive Run · source · script 124
29 Craps Plays · interactive Run · source · script 82
30 Cube Plays · interactive Run · source · script 161
31 Depth Charge Plays · interactive Run · source · script 33
32 Diamond Plays · interactive Run · source · script 27
33 Dice Plays · interactive Run · source · script 31
34 Digits Interactive · stops at a known divergence Run · source · script 78
35 Even Wins Plays · interactive Run · source · script 128
36 Flip Flop Plays · interactive Run · source · script 79
37 Football Plays · interactive Run · source · script 298
38 Fur Trader Plays · interactive Run · source · script 170
39 Golf Plays · interactive Run · source · script 244
40 Gomoko Plays · interactive Run · source · script 54
41 Guess Interactive · asks you Run · source 40
42 Gunner Plays · interactive Run · source · script 52
43 Hammurabi Plays · interactive Run · source · script 119
44 Hangman Plays · interactive Run · source · script 81
45 Hello Plays · interactive Run · source · script 83
46 Hexapawn Refused by name See the refusal · source 174
47 Hi-Lo Plays · interactive Run · source · script 29
48 High IQ Interactive · stops at a known divergence Run · source · script 135
49 Hockey Interactive · stops at a known divergence Run · source · script 210
50 Horserace Interactive · stops at a known divergence Run · source · script 130
51 Hurkle Interactive · asks you Run · source 51
52 Kinema Interactive · asks you Run · source 34
53 King Plays · interactive Run · source · script 268
54 Letter Interactive · asks you Run · source 26
55 Life Interactive · asks you Run · source 66
56 Life for Two Interactive · stops at a known divergence Run · source · script 83
57 Literature Quiz Plays · interactive Run · source · script 49
58 Love Plays · interactive Run · source · script 34
59 Lunar LEM Rocket Plays · interactive Run · source · script 246
60 Mastermind Plays · interactive Run · source · script 232
61 Math Dice Interactive · asks you Run · source 60
62 Mugwump Interactive · asks you Run · source 56
63 Name Plays · interactive Run · source · script 25
64 Nicomachus Interactive · asks you Run · source 34
65 Nim Plays · interactive Run · source · script 156
66 Number Plays · interactive Run · source · script 37
67 One Check Plays · interactive Run · source · script 86
68 Orbit Plays · interactive Run · source · script 96
69 Pizza Plays · interactive Run · source · script 68
70 Poetry Runs without stopping Run · source 51
71 Poker Plays · interactive Run · source · script 416
72 Queen Plays · interactive Run · source · script 168
73 Reverse Plays · interactive Run · source · script 62
74 Rock Scissors Paper Plays · interactive Run · source · script 33
75 Roulette Interactive · stops at a known divergence Run · source · script 239
76 Russian Roulette Interactive · asks you Run · source 26
77 Salvo Interactive · asks you Run · source 329
78 Sine Wave Refused by name See the refusal · source 17
79 Slalom Interactive · stops at a known divergence Run · source · script 165
80 Slots Plays · interactive Run · source · script 134
81 Splat Refused by name See the refusal · source 128
82 Stars Interactive · asks you Run · source 54
83 Stock Market Refused by name See the refusal · source 232
84 Super Star Trek Plays · interactive Run · source · script 425
85 Synonym Plays · interactive Run · source · script 53
86 Target Interactive · asks you Run · source 51
87 3-D Plot Runs Run · source 17
88 3-D Tic-Tac-Toe Plays · interactive Run · source · script 281
89 Tic-Tac-Toe Interactive · asks you Run · source 69
90 Tower Plays · interactive Run · source · script 125
91 Train Plays · interactive Run · source · script 24
92 Trap Interactive · asks you Run · source 49
93 23 Matches Plays · interactive Run · source · script 64
94 War Plays · interactive Run · source · script 68
95 Weekday Plays · interactive Run · source · script 150
96 Word Plays · interactive Run · source · script 65

The 12 that stop mid-game, and what stopped them

12 interactive listings run, ask their questions, and then reach a runtime refusal that the d/BASIC conformance ledger already records as a named divergence. The commonest cause is Microsoft BASIC's habit of quietly declaring any undeclared array with ten elements and of letting a scalar and an array share one name; d/BASIC refuses both by rule (NOT_AN_ARRAY, SUBSCRIPT) rather than guess. Each one is a ledger row with a date, and the committed trace for the listing ends at the same refusal the browser reaches.

  • Amazing — Interactive; with its 1-answer script it reaches a known divergence and stops: SUBSCRIPT (ARGUMENT rule 0x6007). Run it and play up to that point.
  • Basketball — Interactive; with its 3-answer script it reaches a known divergence and stops: CALL_STACK_OVERFLOW (CAPACITY rule 0x6009). Run it and play up to that point.
  • Battle — Interactive; with its 0-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.
  • Bombardment — Interactive; with its 2-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.
  • Bug — Interactive; with its 17-answer script it reaches a known divergence and stops: RETURN_WITHOUT_GOSUB (STATE rule 0x600A). Run it and play up to that point.
  • Digits — Interactive; with its 2-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.
  • High IQ — Interactive; with its 2-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.
  • Hockey — Interactive; with its 19-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.
  • Horserace — Interactive; with its 2-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.
  • Life for Two — Interactive; with its 6-answer script it reaches a known divergence and stops: CALL_STACK_OVERFLOW (CAPACITY rule 0x6009). Run it and play up to that point.
  • Roulette — Interactive; with its 4-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.
  • Slalom — Interactive; with its 5-answer script it reaches a known divergence and stops: NOT_AN_ARRAY (STATE rule 0x6008). Run it and play up to that point.

The 7 that refuse, and why that is the point

d/BASIC keeps QuickBASIC's grammar while preserving authored identifier boundaries. Microsoft's 1970s interpreters "crunched" keywords out of any run of letters, so REMARKABLE became REM ARKABLE and FORI became FOR I; d/BASIC will not guess at those names. Compact operators after a numeric token, such as 1TO9, are accepted because that boundary is unambiguous. The remaining ambiguous programs refuse by name, at the line, with a rule id, instead of running something slightly different.

  • Animal — Refused at compile time, line 43: 'NEXT' cannot start a statement (DB0020). Open it and read the diagnostic on the console.
  • Awari — Refused at compile time, line 33: FOR is never closed (DB0022). Open it and read the diagnostic on the console.
  • Checkers — Refused at compile time, line 46: FOR is never closed (DB0022). Open it and read the diagnostic on the console.
  • Hexapawn — Refused at compile time, line 78: 'THIS' cannot start a statement (DB0020). Open it and read the diagnostic on the console.
  • Sine Wave — Refused at compile time, line 4: no SUB or FUNCTION named 'REMARKABLE' (DB0031). Open it and read the diagnostic on the console.
  • Splat — Refused at compile time, line 75: no such line or label: 540 (DB0012). Open it and read the diagnostic on the console.
  • Stock Market — Refused at compile time, line 139: this operator does not take strings (DB0032). Open it and read the diagnostic on the console.

Every refusal above is a named row in the d/BASIC conformance ledger, not a silent gap. Fix the line the diagnostic names and the listing runs. See Compatibility, Migration & Refusals.

Attribution

The listings are reproduced from coding-horror/basic-computer-games, commit 5301155, dedicated to the public domain under the Unlicense. Per-listing provenance, including upstream paths and SHA-256 digests, is in PROVENANCE.json; the full notice is ATTRIBUTION.txt. BASIC Computer Games is © 1978 David H. Ahl and its individual program authors. The transcriptions carried here are those of the coding-horror/basic-computer-games project, dedicated to the public domain by that project's contributors under the Unlicense.