{"id":18071,"date":"2026-05-19T16:40:57","date_gmt":"2026-05-19T20:40:57","guid":{"rendered":"https:\/\/scruss.com\/blog\/?p=18071"},"modified":"2026-05-19T16:40:57","modified_gmt":"2026-05-19T20:40:57","slug":"the-broken-basic-years","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2026\/05\/19\/the-broken-basic-years\/","title":{"rendered":"The Broken BASIC Years"},"content":{"rendered":"\n<p>I polled Mastodon people a few weeks back:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"621\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-03-21-at-23-00-09-Stewart-Russell-If-you-had-a-home-computer-wit\u2026-XOXO-Zone.png\" alt=\"mastodon poll:\nIf you had a home computer with BASIC, how many times did this programme print the text '3 TO 2' on your computer?\n\n10 FOR X=3 TO 2\n20 PRINT &quot;3 TO 2&quot;\n30 NEXT X\n\nResults:\n\n28%: 0 \/ None\n57%: 1 \/ Once\n15%: Something else, or show me the results\" class=\"wp-image-18072\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-03-21-at-23-00-09-Stewart-Russell-If-you-had-a-home-computer-wit\u2026-XOXO-Zone.png 664w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-03-21-at-23-00-09-Stewart-Russell-If-you-had-a-home-computer-wit\u2026-XOXO-Zone-320x299.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-03-21-at-23-00-09-Stewart-Russell-If-you-had-a-home-computer-wit\u2026-XOXO-Zone-160x150.png 160w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/figure>\n\n\n\n<p>Twice as many people said their home computer&#8217;s BASIC did something illogical as said it did the right thing. What gives?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The <em>de facto<\/em> problem<\/h2>\n\n\n\n<p>BASIC was refined over several years in the mid-1960s as part of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dartmouth_Time-Sharing_System\">Dartmouth Time-Sharing System<\/a> (DTSS) running on a GE mainframe. It was intended to be accessible to all students at Dartmouth. Responsiveness to user commands was valued over performance. The concept caught on, and by 1970 DEC, HP, IBM and GE all had time sharing BASIC systems in the market.<\/p>\n\n\n\n<p>The language was simple enough that if you&#8217;d used it before on another system, you&#8217;d have a good idea how it should look. Implementations of BASIC sprung up on lots of computer systems based on whatever documentation was at hand: if you were lucky, maybe a photostat of a <a href=\"https:\/\/www.dartmouth.edu\/basicfifty\/basicmanual_1964.pdf\">Dartmouth BASIC manual<\/a>, or maybe one of the <a href=\"https:\/\/archive.org\/details\/bitsavers_decpdp8hannguagesMay70_19210126\/page\/n87\/mode\/1up\">programming manuals<\/a> that DEC sold for their PDP-8 systems. <\/p>\n\n\n\n<p>The original BASIC ran on a mainframe computer with each line being compiled into separate jobs by a terminal server. Early microcomputer developers, however, saw BASIC as something they could fit into a few thousand bytes as an interpreter. With so little space to work in, and so few guidelines to work from, implementation rules became very blurred. Here&#8217;s what you might have expected to see if you fired up your 8K Altair 8800 some time in 1976 after buying a shiny new (and $$) copy of Altair BASIC:<\/p>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><pre><code>MEMORY SIZE? 8192\nTERMINAL WIDTH? 80\nWANT SIN-COS-TAN-ATN? N\n\n1862 BYTES FREE\nALTAIR BASIC REV. 4.0\n[EIGHT-K VERSION]\nCOPYRIGHT 1976 BY MITS INC.\nOK\n10 FOR X=3 TO 2 STEP 1\n20 PRINT X\n30 NEXT X\n40 PRINT X\nRUN\n 3 \n 4 \nOK\n<\/code><\/pre>\n<\/div>\n\n\n\n<p>With so little memory to play with, the <em>FOR X=3 TO \u2026<\/em> is effectively treated as <em>LET X=3<\/em>, and <em>NEXT X<\/em> becomes <em>LET X=X+1<\/em> (with an optional <em>GOTO 20<\/em> if X &lt; 2, which it never is). The <a href=\"http:\/\/dunfield.classiccmp.org\/altair\/d\/abasic.pdf\">1975 Altair BASIC Manual<\/a> has a slightly more lucid description on page 32, but doesn&#8217;t explain <u>why<\/u> it does this. Maybe it was influenced by FORTRAN-66, which always executed a <em>DO<\/em> clause once.<\/p>\n\n\n\n<p>The only guidance against this admittedly illogical behaviour is hidden away on <a href=\"https:\/\/archive.org\/details\/bitsavers_dartmouthB_3679804\/page\/n40\/mode\/1up\">page 37 of the Dartmouth BASIC 4th Edition manual<\/a> from 1968:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"101\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-18-at-16-33-44-dartmouth-BASIC-4th-Edition-Jan68-Free-Download-Borrow-and-Streaming-Internet-Archive.png\" alt=\"text: If you write 50 FOR Z = 2 TO -2, without a negative step size, the body of the loop will not be performed and the computer will proceed to the statement immediately following the corresponding NEXT statement.\" class=\"wp-image-18102\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-18-at-16-33-44-dartmouth-BASIC-4th-Edition-Jan68-Free-Download-Borrow-and-Streaming-Internet-Archive.png 709w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-18-at-16-33-44-dartmouth-BASIC-4th-Edition-Jan68-Free-Download-Borrow-and-Streaming-Internet-Archive-320x46.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-18-at-16-33-44-dartmouth-BASIC-4th-Edition-Jan68-Free-Download-Borrow-and-Streaming-Internet-Archive-160x23.png 160w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><figcaption class=\"wp-element-caption\">No, I can&#8217;t get past that the Os are slashed and the 0s are not, either<\/figcaption><\/figure>\n\n\n\n<p>So in a feat of mass emulation (and sometimes using real vintage hardware), here are some BASIC systems that <strong>always<\/strong> execute a <em>FOR<\/em> loop at least once:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Altair BASIC 8K (version 4.0, 1976, Microsoft &#8211; 8080)<\/li>\n\n\n\n<li>BASIC-E (version 2.0, 1976, Digital Research &#8211; 8080)<\/li>\n\n\n\n<li>Tiny BASIC (version 3.1, 1976, Sherry Bros.\/Li Chen Wang &#8211; 8080)<\/li>\n\n\n\n<li>BASIC-80 (version 4.51, 1977, Microsoft &#8211; 8080)<\/li>\n\n\n\n<li>Commodore BASIC (1977, Microsoft &#8211; 6502)<\/li>\n\n\n\n<li>Integer BASIC (1977, Apple &#8211; 6502)<\/li>\n\n\n\n<li>TRS-80 Level I BASIC (1977, Radio Shack &#8211; Z80)<\/li>\n\n\n\n<li>AppleSoft BASIC (version 2.0, 1978, Microsoft &#8211; 6502)<\/li>\n\n\n\n<li>Atari BASIC (1979, Atari Inc. &#8211; 6502)<\/li>\n\n\n\n<li>Atom BASIC (1980, Acorn &#8211; 6502)<\/li>\n\n\n\n<li>Sinclair ZX80 BASIC (1980, Sinclair Research &#8211; Z80)<\/li>\n\n\n\n<li>BASIC3 (version 1.1, 1981, RCA &#8211; 1802)<\/li>\n\n\n\n<li>BBC BASIC (version 2, 1981, Acorn &#8211; 6502)<\/li>\n\n\n\n<li>CBASIC (version 2.07, 1981, Digital Research &#8211; 8080)<\/li>\n\n\n\n<li>Extended Color BASIC (version 1.1, 1982, Microsoft &#8211; 6809)<\/li>\n\n\n\n<li>Lynx BASIC (1983, Camputers &#8211; Z80)<\/li>\n\n\n\n<li>MSX BASIC (version 1.0, 1983, Microsoft &#8211; Z80)<\/li>\n\n\n\n<li>MTX BASIC (1983, Memotech Ltd &#8211; Z80)<\/li>\n\n\n\n<li>Oric Extended BASIC (version 1.1, 1983, Tangerine &#8211; 6502)<\/li>\n<\/ul>\n\n\n\n<p>And these are the interpreters that handle <em>FOR<\/em> loop variables correctly:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PDP-8 BASIC (1970, DEC &#8211; PDP-8)<\/li>\n\n\n\n<li>TOPS-10 BASIC (version 5.03, 1972, DEC &#8211; PDP-10 KA10)<\/li>\n\n\n\n<li>9830 BASIC (1973, Hewlett-Packard &#8211; HP9800)<\/li>\n\n\n\n<li>5100 BASIC (1975, IBM &#8211; PALM)<\/li>\n\n\n\n<li>HP 2000\/Access BASIC (version r.1534, 1975, Hewlett-Packard &#8211; HP2000)<\/li>\n\n\n\n<li>BASIC-11\/RT-11 (V02-03, 1978, DEC &#8211; PDP-11)<\/li>\n\n\n\n<li>BASIC-80 (version 5.21, 1981, Microsoft &#8211; 8080)<\/li>\n\n\n\n<li>IBM PC BASIC (version 1.10, 1981, Microsoft &#8211; 8088)<\/li>\n\n\n\n<li>Sinclair ZX81 BASIC (1981, Sinclair Research &#8211; Z80)<\/li>\n\n\n\n<li>Amstrad CPC464 BASIC (version 1.0, 1984, Locomotive Software &#8211; Z80)<\/li>\n\n\n\n<li>BASIC for Macintosh (version 2.00, 1984, Microsoft &#8211; 68000)<\/li>\n\n\n\n<li>Mallard-80 BASIC (version 1.29, 1984, Locomotive Software &#8211; Z80)<\/li>\n\n\n\n<li>SuperBASIC (QL) (1984, Sinclair Research &#8211; 68000)<\/li>\n\n\n\n<li>Extended BASIC (version 5.7, 1985, Data General &#8211; DG Nova)<\/li>\n\n\n\n<li>Enterprise IS-BASIC (version 1.0, 1985, Elan\/Intelligent Software &#8211; Z80)<\/li>\n\n\n\n<li>Amiga BASIC (version 1.2, 1986, Microsoft &#8211; 68000)<\/li>\n\n\n\n<li>Atari ST BASIC (1987, Metacomco &#8211; 68000)<\/li>\n\n\n\n<li>GfA BASIC (version 3.51, 1988, GFA Software &#8211; 68000)<\/li>\n\n\n\n<li>GW-BASIC (version 3.23, 1988, Microsoft &#8211; 8088)<\/li>\n\n\n\n<li>QBasic (version 1.1, 1992, Microsoft &#8211; 8088)<\/li>\n<\/ul>\n\n\n\n<p>It&#8217;s a little hard to see trends in a sea of bullet points, but:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Up until about 1975, BASIC systems from DEC, Hewlett-Packard and IBM did the right thing with <em>FOR<\/em> loop variables. <\/li>\n\n\n\n<li>Small BASIC systems on the Intel 8080 appearing after 1975 introduced uncertainty in <em>FOR<\/em> loop behaviour.<\/li>\n\n\n\n<li>Many of these iffy systems were written by Microsoft, though many other vendors copied that behaviour. (Whether they copied code too, I can&#8217;t tell).<\/li>\n\n\n\n<li>The ANSI working group efforts to develop a standard for BASIC between 1974\u201377 were too late to have much influence. At best, they codified a standard almost identical to Dartmouth BASIC of 1964, thirteen years too late. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Changes \u2026 but why?<\/h2>\n\n\n\n<p>Microsoft did make a change in their <em>FOR<\/em> loop behaviour, though:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>BASIC-80 (version 4.51, 1977) always went through the loop at least once;<\/li>\n\n\n\n<li>BASIC-80 (version 5.21, 1981) did not.<\/li>\n<\/ul>\n\n\n\n<p>What prompted that change is referenced in a tiny little note in the <a href=\"https:\/\/archive.org\/details\/BASIC-80_MBASIC_Reference_Manual\/page\/n2\/mode\/1up\">manual<\/a>&#8216;s introduction<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>In its fifth major release (Release 5.0), BASIC-80 meets the ANSI qualifications for BASIC, as set forth in document BSRX3.60-1978.<\/p>\n<\/blockquote>\n\n\n\n<p>This still doesn&#8217;t explain why Microsoft changed their interpreter. But one document does, indirectly: <a href=\"https:\/\/archive.org\/details\/federalinformati68nati\/mode\/2up\">Federal Information Processing Standards Publication 68: minimal BASIC<\/a> from September 1980. It states that ANSI Standard X3.60-1978 is adopted as a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Federal_Information_Processing_Standards\">FIPS<\/a> norm, and therefore:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>11.1 Acquisition of Minimal BASIC Processors. <br>The provisions of this publication are effective on September 4, 1980. All BASIC processors specified for Federal use after this date must implement Federal Standard Minimal BASIC.<\/p>\n<\/blockquote>\n\n\n\n<p>In short, Microsoft wasn&#8217;t going to be able to sell BASIC to US Government agencies after September 1980 unless they fixed it. And selling software is what motivates Microsoft most. So they fixed it.<\/p>\n\n\n\n<p>(Curiously, the actual text of ANSI X3.60-1978 is still paywalled, though the supposedly similar <a href=\"https:\/\/archive.org\/details\/ecma-55-1978\">Standard ECMA-55: Minimal BASIC<\/a> is available. I will never understand standards bodies and their eternal grabby hands.)<\/p>\n\n\n\n<p>Sinclair, by complete coincidence, also changed how <em>FOR<\/em> loops work between the ZX80 and ZX81. I doubt that this was for FIPS compliance, but rather that ZX81 BASIC was in an 8K ROM instead of a 4K one, so there was more room to do the right thing.<\/p>\n\n\n\n<p>It&#8217;s also interesting to note that Microsoft didn&#8217;t change <em>all<\/em> of their BASIC interpreters after 1980. Sure, the important (as in, $$$ for Microsoft) ones like IBM PC BASIC got it, but the later MSX BASIC didn&#8217;t. MSX wasn&#8217;t a low-effort port, though: it had a new graphics system and a completely different decimal floating point package.<\/p>\n\n\n\n<p>And if only Acorn had read the BBC&#8217;s \u201c<a href=\"https:\/\/www.bbcbasic.co.uk\/bbcbasic\/beebspec.html\">Outline Specification for the BBC Microcomputer System<\/a>\u201d in detail, they might have caught the requirement that:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The general syntax of all commands should be identical to Microsoft BASIC 5.0 (repeat 5.0)<\/p>\n<\/blockquote>\n\n\n\n<p>With better reading comprehension, Acorn would have had an almost perfect BASIC interpreter in the BBC Micro. Oh well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What came next?<\/h2>\n\n\n\n<p>I&#8217;ve already shown that a standard, especially one that had commercial ramifications, changed the way BASIC behaved after 1981. But BASIC language development mostly ignored any formal standards.<\/p>\n\n\n\n<p>Associated with the FIPS norm were the National Bureau of Standards&#8217; <strong>Minimal BASIC Test Programs<\/strong>. The version 2 test set from 1980 is <em>still<\/em> available from NBS:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/nvlpubs.nist.gov\/nistpubs\/Legacy\/SP\/nbsspecialpublication500-70v1.pdf\">Volume 1: Documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/nvlpubs.nist.gov\/nistpubs\/Legacy\/SP\/nbsspecialpublication500-70v2.pdf\">Volume 2: Source Listings and Sample Output<\/a><\/li>\n<\/ul>\n\n\n\n<p>There are more than 200 test programs, which you can attempt to run, if you must. They&#8217;ve been collected in source form by John Gatewood Ham, Jorge Giner Cordero and others, with an archive available here: <a href=\"https:\/\/github.com\/jorgicor\/bas55\/tree\/master\/tests\">bas55\/tests<\/a> as part of the <a href=\"https:\/\/github.com\/jorgicor\/bas55\">bas55<\/a> Minimal BASIC interpreter.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/archive.org\/details\/federalinformat6821nati_0\/mode\/2up\">ANSI full BASIC standard<\/a> sneaked out in early 1987 to little fanfare. Most of the working group were from mainframe companies, though Thomas Kurtz (one of the originators of BASIC at Dartmouth, along with John Kemeny) was still part of the process. There are no names from micro companies: except for one &#8220;J. Raskin&#8221;, possibly <a href=\"https:\/\/en.wikipedia.org\/wiki\/Jef_Raskin\">Jef Raskin<\/a>, ex Apple.<\/p>\n\n\n\n<p>Kemeny &amp; Kurtz couldn&#8217;t leave BASIC alone, and in 1985 had written &#8220;<a href=\"https:\/\/archive.org\/details\/BackToBASIC-KemenyKurtz\">Back to BASIC : the history, corruption, and future of the language<\/a>&#8220;. Reading it now, it seems to be a sour-grapes rant against &#8220;street BASIC&#8221; dialects taking over. But never fear, Messrs. K&amp;K were releasing <strong>TrueBASIC<\/strong> that was <em>sure<\/em> to put those street ruffians to rights. While TrueBASIC soldiered on as a product until the 2020s, it never left a legacy. The two Dartmouth professors&#8217; grip on the language had strangled BASIC and left it as a quaint but inert toy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I polled Mastodon people a few weeks back: Twice as many people said their home computer&#8217;s BASIC did something illogical as said it did the right thing. What gives? The de facto problem BASIC was refined over several years in the mid-1960s as part of the Dartmouth Time-Sharing System (DTSS) running on a GE mainframe. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"BASIC on micros handled FOR loops their own way. Then, after 1981, they mostly behaved better \u2014 and all because of an obscure US Government standard\n\n#basic #RetroComputing #emulation #ComputerHistory","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2062,3027,2556],"class_list":["post-18071","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-basic","tag-cbmbasic","tag-retrocomputing"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-4Ht","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/18071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=18071"}],"version-history":[{"count":13,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/18071\/revisions"}],"predecessor-version":[{"id":18110,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/18071\/revisions\/18110"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=18071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=18071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=18071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}