Dartmouth BASIC, typed in from its first instruction manual of May 1964, and the one program a later BASIC would not run.
Published manuscript · v1.1
01 / MAY 1964
BASIC’s first instruction manual is a typescript from the Dartmouth College Computation Center, dated May 1964 and marked First Draft. Its preface says the college was building a system that “will enable 20 or more people to use the computer at the same time”, and lists what the language for it had to do. The first requirement: “It should be very easy to learn.” Then, as evidence, and “without any explanation”, it prints a whole program. Three lines, to work out seven plus eight, divided by three.
PROGRAM / CHANGE IT / HOVER OVER ANY WORD
OUTPUT / RUNS IN YOUR BROWSER
That program, with the line numbers the manual gives it on page 4. It is running in your browser, not replayed. Change the sum and run it again.
02 / FOURTEEN WORDS
A Dartmouth BASIC program is a list of numbered instructions. The computer starts at the lowest number and works upwards, so the numbers are the order, whatever order the lines were typed in. The manual suggests leaving gaps, such as counting in tens, “so that further instructions may be inserted if the need arises.” Each instruction is one operation and what it applies to, and there are not many: “The last instruction in any BASIC program is ‘END’. There are only 13 other operations.” LET puts a value in a variable. PRINT shows it. FOR and NEXT repeat the lines between them. IF … THEN and GO TO decide which line comes next. READ takes numbers from DATA lines, and DEF gives a formula a name. A variable is “any single letter, or a letter followed by one digit.”
03 / THE PAGE PRINTS ITS OWN ANSWERS
The reprint Dartmouth hosts, which is the beginners’ part, ends with three example programs and, under each, what it printed and how long it took. Program number 1 averages the logarithms of the numbers 1 to 100 and prints 1.5797, in three seconds. I typed all three in from the scan. They are a test nobody had to write, because the expected output is on the page.
PROGRAM / CHANGE IT / HOVER OVER ANY WORD
OUTPUT / RUNS IN YOUR BROWSER
Program number 1, from page 21. The 1964 page prints 1.5797, and so does this. Switch off AS IN 1964 and a later BASIC prints the same number to nine figures.
04 / WHAT IS NOT THERE
What the beginners’ part leaves out says as much as what it has. There is no way to ask the person at the teletype a question: a program’s numbers come from its DATA lines, and to try other numbers you change the program. There are no variables for words, only for numbers. Powers are written with an arrow, X↑2, because “on a tele-type typewriter it is impossible to print superscripts”. The manual treats changing the program as the normal way to use it. Under program number 3 it says, “We can find the root of a different function by changing a single instruction”, prints the new line 30, and prints the new result.
PROGRAM / CHANGE IT / HOVER OVER ANY WORD
OUTPUT / RUNS IN YOUR BROWSER
Program number 3, from page 23. Run it, then do what the manual does: replace line 30 with 30 DEF FNF(Z) = EXP(X) -2 and run it again. The page prints .837585, then .693176. The new line is typed here as it is printed, with an X where the first one had a Z. It still works, because the program only ever asks for FNF(X).
05 / HOW IT RUNS HERE
This is not Dartmouth’s compiler. It is an interpreter written in Rust and compiled to WebAssembly, and nothing you type is sent anywhere. I had started it in Python: a tokenizer and a parser, which never ran a program. I asked a coding agent to move it to Rust and finish it. Neither of us began from the 1964 manual.
06 / CHECKED AGAINST LATER BASICS
How would I know it was right? The agent wrote tests, and they passed. Then it ran 103 listings from David Ahl’s BASIC Computer Games of 1978, which nobody involved had written, and every one loads and runs without changes, as the coding-horror collection has them; that collection was normalised for Vintage BASIC, so they are not the printed book line for line. Then it ran test programs through PC-BASIC, an independent emulation of Microsoft’s GW-BASIC. Twenty-two of them print the same on standard output in both, byte for byte once PC-BASIC’s line endings and closing prompt are set aside, and the comparison found one real mistake. Error messages were not compared. Everything agreed. All of it was BASIC from fourteen years or more after the manual.
07 / LINE 40
Then I asked for pages of the 1964 manual, for this note, and the example programs came with them. Programs 1 and 3 gave the page’s figures. Program 2 solves quadratic equations, and on its third set of numbers it stopped: Illegal function call: SQR, in line 40. Line 40 takes a square root before the program has looked at whether the number is negative. Page 5 says why that was fine in 1964: “SQR(A) stands for √A, where the square-root is always taken of the absolute value of A.” The games and the second interpreter come from later BASICs, where, in the two I could run, the square root of a negative number is an error. They agreed with each other, and my interpreter agreed with them. The oldest page disagreed with all of it.
PROGRAM / CHANGE IT / HOVER OVER ANY WORD
OUTPUT / RUNS IN YOUR BROWSER
Program number 2, as later BASICs run it. Press RUN: it stops at line 40. Switch on AS IN 1964 and run it again, and the last result reads IMAGINARY PART= 1.41421, as the page does. It goes back for more numbers until there are none, and then, as page 15 says the computer does when READ runs out of data, it stops.
WHAT THIS DOES NOT SHOW
- This is not Dartmouth’s 1964 BASIC. It is an interpreter written sixty-two years later. In 1964 mode it follows the manual on square roots, powers, printing and the end of the data, and Thomas Kurtz’s later account on INT, RND and a leading minus sign, which the beginners’ part does not cover. Taking Kurtz’s account as a description of May 1964 is a reading.
- How numbers are printed in 1964 mode, six figures and a point after a whole number, is copied from the results on pages 21 to 23. The beginners’ part does not state the rule, and I have not seen Part II.
- In 1964 mode it still accepts everything the later BASICs added. It does not refuse INPUT or a variable called NAME$.
- Three examples agreeing is three examples, and agreeing in their figures: the page’s layout, its TIME: lines, and its READ PART where the program says REAL PART, are not reproduced. The rule for square roots turned up because one program happened to need it. Other differences may be waiting for a program that needs them.
- The checks were run by the coding agent and reported to me. It also miscounted its own tests twice, saying 120 and then 122 when there were 88, and corrected itself when it ran them again.
- A second model, OpenAI’s Codex, later reviewed the repository independently. It found that 1964 mode differed from Kurtz’s account on INT, RND and a leading minus, that RANDOMIZE could change numbers the playground had already shown, and that the games were described as unmodified. These are put right, and its review, with what was done about each point, is in the repository.
Sources that agree with each other are evidence about those sources.
Which BASIC is the reference for BASIC?
The interpreter now has a switch: later BASIC unless asked, Dartmouth’s 1964 arithmetic and printing on request. That is a decision, not a discovery. Every check I had was a later BASIC agreeing with a later BASIC, and the manual was on Dartmouth’s website the whole time.
Thematic notebook / Published record
Closing thought
An interpreter can run every later program it is shown, agree with a second implementation, and still stop on the language’s first manual. In 1964 a square root was taken of the absolute value; the later BASICs that everything had been checked against call that an error.








