{"id":"N-BASIC","url":"https://chrishayuk.com/notebook/the-manual-stopped-at-line-40","currentVersion":"1.1","publication":"published","scientificStatus":"OPEN","versions":[{"version":"1.0","title":"The manual stopped at line 40.","abstract":"A note about Dartmouth BASIC, with the language running in the page. The first instruction manual, from May 1964, explains the language in a few pages and prints three example programs with their results; they are typed in here beside the pages they came from, and print the same figures. The interpreter running them was written in Rust with a coding agent and checked against later BASICs, which it matched. The manual’s own second example then stopped at line 40: in 1964 a square root was taken of the absolute value, and the later BASICs it had been checked against call that an error.","authors":["Chris Hay"],"url":"https://chrishayuk.com/records/N-BASIC/1.0","published":"2026-11-22","publication":"published","scientificStatus":"OPEN","supersededBy":[],"hash":"3a6d7eb1e9d90cdda5bcd0c4cd99926c07f746561684c8e6f952f366dcdbf391","algorithm":"sha256","revision":{"kind":"initial","summary":"First publication: Dartmouth BASIC from its May 1964 instruction manual, the manual's programs running beside their pages, the example that stopped at line 40 on an interpreter checked only against later BASICs, and what the 1964 mode does and does not reproduce"},"next":"https://chrishayuk.com/records/N-BASIC/1.1","sources":[{"title":"Dartmouth College Computation Center, “BASIC”, instruction manual, May 1964, first draft. Commemorative reprint hosted by Dartmouth College","url":"https://www.dartmouth.edu/basicfifty/basicmanual_1964.pdf","note":"The preface is on p. 1; “only 13 other operations” on p. 4; numbers, variables, the arrow and SQR on p. 5; the example programs and their results on pp. 21–23."},{"title":"chrishayuk/chuk-basic-rs","url":"https://github.com/chrishayuk/chuk-basic-rs","note":"The interpreter, a compiler to WebAssembly, their tests, a tutorial, 150 sample programs including the manual’s, and reduced scans of the manual."},{"title":"David H. Ahl (ed.), BASIC Computer Games, 1978. Listings from coding-horror/basic-computer-games","url":"https://github.com/coding-horror/basic-computer-games","note":"103 program listings (the collection counts 96 games), run unmodified, as a check on the interpreter."},{"title":"PC-BASIC 2.0.8, an emulation of Microsoft GW-BASIC","url":"https://robhagemans.github.io/pcbasic/","note":"Run on the manual’s program 2 for this note: it stops with “Illegal function call in 40”."},{"title":"Coding-agent session, 21–22 November 2026","note":"The counts in section 06 are the agent’s, as reported. The programs from the manual were run again for this note, and can be run above."}],"manuscript":"https://chrishayuk.com/api/record/N-BASIC?version=1.0","citations":"https://chrishayuk.com/api/citations/N-BASIC?version=1.0"},{"version":"1.1","title":"The manual stopped at line 40.","abstract":"A note about Dartmouth BASIC, with the language running in the page. The first instruction manual, from May 1964, explains the language in a few pages and prints three example programs with their results; they are typed in here beside the pages they came from, and print the same figures. The interpreter running them was written in Rust with a coding agent and checked against later BASICs, which it matched. The manual’s own second example then stopped at line 40: in 1964 a square root was taken of the absolute value, and the later BASICs it had been checked against call that an error.","authors":["Chris Hay"],"url":"https://chrishayuk.com/records/N-BASIC/1.1","published":"2026-11-22","revised":"2026-11-22","publication":"published","scientificStatus":"OPEN","supersededBy":[],"hash":"0bb96fc30f38e83573833cd65d54eb8b9f420ab4b59ec6f73dbc3339dd0c8e26","algorithm":"sha256","revision":{"kind":"correction","summary":"The 103 games run as the coding-horror collection has them, normalised for Vintage BASIC, not as the 1978 book prints them; the PC-BASIC comparison is byte for byte on standard output after normalising line endings and the prompt; 1964 mode now also follows Kurtz on INT, RND and a leading minus. An independent review by a second model is described.","previous":"1.0"},"previous":"https://chrishayuk.com/records/N-BASIC/1.0","sources":[{"title":"Dartmouth College Computation Center, “BASIC”, instruction manual, May 1964, first draft. Commemorative reprint hosted by Dartmouth College","url":"https://www.dartmouth.edu/basicfifty/basicmanual_1964.pdf","note":"The preface is on p. 1; “only 13 other operations” on p. 4; numbers, variables, the arrow and SQR on p. 5; the example programs and their results on pp. 21–23."},{"title":"chrishayuk/chuk-basic-rs","url":"https://github.com/chrishayuk/chuk-basic-rs","note":"The interpreter, a compiler to WebAssembly, their tests, a tutorial, 150 sample programs including the manual’s, and reduced scans of the manual."},{"title":"David H. Ahl (ed.), BASIC Computer Games, 1978. Listings from coding-horror/basic-computer-games","url":"https://github.com/coding-horror/basic-computer-games","note":"103 program listings (the collection counts 96 games), run unmodified, as a check on the interpreter."},{"title":"PC-BASIC 2.0.8, an emulation of Microsoft GW-BASIC","url":"https://robhagemans.github.io/pcbasic/","note":"Run on the manual’s program 2 for this note: it stops with “Illegal function call in 40”."},{"title":"Coding-agent session, 21–22 November 2026","note":"The counts in section 06 are the agent’s, as reported. The programs from the manual were run again for this note, and can be run above."}],"manuscript":"https://chrishayuk.com/api/record/N-BASIC?version=1.1","citations":"https://chrishayuk.com/api/citations/N-BASIC?version=1.1"}]}