Ah, BASIC. For a few generations of programmers, it was the first language you ever learned, and then an object of scorn and derision once you learned a “real” language. It was the lingua franca of the first wave of home computers, most of which ran an interpreter that made its authors, Bill Gates and Paul Allen, rich men well before anyone associated them with the word “Windows.” In the ‘90s, it transmogrified into Visual Basic, which briefly displaced COBOL as the language for buggy unmaintainable internal corporate software, before becoming the .NET ecosystem’s red-headed stepchild and never being heard from again. That’s the story of BASIC most programmers nowadays will tell you.
Of course, BASIC wasn’t invented by Gates and Allen, but by Kemeny and
Kurtz. Their story is a bit of a tragicomedy. Obviously the original
version of BASIC on the Dartmouth Time-Sharing System was quite an
achievement back in 1964, but Kemeny and Kurtz stuck with their
mainframe platform while the rest of the world moved on. In the 1970s,
as ANSI was trying to write a standard for BASIC, the original DTSS
compiler added ALGOL-style procedures and block structure, making
those nasty piles of GOTO
s unnecessary… and meanwhile
microcomputers were reaching far more people than ever logged into a
mainframe, with old-fashioned GOTO
-filled BASIC running on each and
every one of them. In the 1980s, Kemeny and Kurtz finally noticed how
much money Microsoft had made off their language, and left Dartmouth
to start selling a proper version of BASIC to the unwashed masses,
which they named True BASIC.
Contemporary reviews laughed it off - this language was incompatible
with Microsoft BASIC and the vast library of books and programs
written for it, and all it had going for it was the pedigree of its
authorship. (And the dubious honor of being compliant with the ANSI
standard, which was also MS-incompatible and generally ignored when it
was finally issued in 1987.) More recent reviews have been equally
harsh on its failure
to live up to its pretentious marketing. Between the high price, the
limited compatibility with other BASICs, and the increasing
obsolescence of BASIC as a whole, there’s very little to recommend
True BASIC in this day and age… but they’re somehow still in
business, so somebody has to be buying those $150 “gold edition”
licenses.
But there’s another story to BASIC, one that I haven’t seen anywhere else. It involves a key difference between Dartmouth and Microsoft BASIC, and a pair of mostly forgotten languages that influenced a “missing link” in between.
A few years ago, a poster asked Retrocomputing Stack Exchange about the historical connections between Dartmouth BASIC and a RAND Corporation system called JOSS, written at about the same time. The bemused response was that there probably was no connection - both simply offered the minimal functionality necessary for a programming environment. And indeed, there’s little evidence of influence in either direction. For starters, JOSS was a full time-sharing operating system with an integrated programming language, while BASIC and DTSS were separate systems, though developed concurrently by the same team at Dartmouth. Certainly the languages have very little in common, BASIC being strongly influenced by FORTRAN and JOSS having a verbose “English-like” syntax. Both line numbers and the ability to interleave numbered lines with unnumbered operating system commands appeared in CTSS, which the makers of both JOSS and BASIC/DTSS were clearly aware of. Really, the only BASIC-like thing I see in JOSS is the “immediate mode”, the ability to run statements in the interpreter for instant execution rather than adding them to a program to be run…
But Dartmouth BASIC didn’t have an immediate mode! All you could
type was a numbered line or a DTSS command like LIST
or RUN
-
commands which became so closely associated with BASIC that most
later implementations included them. Dartmouth BASIC wasn’t an
interpreter, it was a compiler, and the RUN
command caused DTSS to
compile the program and then run it as native code. Typing PRINT
2+2
without a line number wouldn’t give you a 4
, it’s a syntax
error. The DTSS and Dartmouth BASIC
manuals never mention any
immediate mode, and I confirmed my suspicion on a DTSS
emulator. The ability to run statements
immediately was a later addition rather than part of the original
design.
With JOSS, on the other hand, the immediacy was the point. Many of the papers on the system draw attention to how much easier JOSS is for the novice programmer to pick up because you can run statements directly and get immediate feedback. Certainly not a unique feature, but a new one at the time - it was 1964, timesharing and interactive computing were only a few years old at that point. The only comparable system I’m aware of that existed then was the LISP read-eval-print loop, itself quite new and experimental at the time.1
JOSS stood for the JOHNNIAC Open Shop System. JOHNNIAC was a one-of-a-kind vacuum tube computer built at RAND in the ‘50s, based on the seminal IAS Machine design. By the early ‘60s, it was on its way out after RAND acquired faster, more reliable transistorized mainframes from IBM, which made it available for experiments like the first version of JOSS, which entered full-time use in January 1964. It turned out that although JOSS ran reasonably quickly even on a fossil like JOHNNIAC, the failures of vacuum tubes brought it down too often for its users’ liking. And so, JOHNNIAC and JOSS I were retired in February 1966, at which time a DEC PDP-6 running JOSS II replaced them.
JOSS was an internal system at RAND, but DEC had produced custom hardware for the JOSS terminals and was interested in porting a similar system to their other, smaller machines. The result was FOCAL, a stripped-down version of the JOSS language for the PDP-82. Some of the English-style grammar was removed, but the distinctive interactive mode was still there, as were other features like dotted line numbers. In combination with the timesharing operating system TSS-8, FOCAL on the PDP-8 made an appealing low-cost system for educators to teach the fundamentals of programming… or it would have, if BASIC hadn’t gotten there first.
David Ahl of Creative Computing magazine, the top programming publication of the BASIC era, explains in this interview how DEC refused to let other computer makers make their own versions FOCAL, while Dartmouth was happy to have BASIC on as many systems as possible. Around this time MECC was getting started and BASIC was becoming the language of choice for educators, so DEC gave in and put BASIC on the PDP-8. It quickly dominated the educational market and FOCAL was a distant second.
A couple of years later, DEC released the PDP-11, the 16-bit system that would dominate 1970s computing. DEC also came out with a BASIC interpreter on paper tape that included a “special feature” - immediate execution of unnumbered statements entered into the interpreter, just like FOCAL. The RSTS-11 operating system, whose early versions closely resembled DTSS, included the BASIC-PLUS interpreter with a similar immediate mode. This was clearly inspired by JOSS and FOCAL, though the manuals don’t mention it. (Why would they? BASIC was meant for people who haven’t used other languages before.)
So DEC BASIC with FOCAL-style immediate mode is a hit, many programmers learn BASIC on DEC machines and think immediate mode is just part of the language, two of those programmers write a microcomputer BASIC interpreter on a PDP-10, and the rest is history.
I don’t know how essential immediate mode was to the success of BASIC or Microsoft. It probably didn’t change much one way or the other, though if DEC had swallowed its pride and marketed FOCAL to other manufacturers, maybe it would’ve won over a non-interactive BASIC. But it is a bit odd that something so essential to the BASIC experience was the work of neither Dartmouth nor Microsoft, but introduced in between on a half-forgotten platform, an idea borrowed from a fully forgotten pair of languages. And maybe the fact that Kemeny and Kurtz didn’t recognize how essential it was, and made it an add-on in premium editions of True BASIC, explains a bit of why True BASIC failed in the market.
I will say this much - for what it was, and the era of computers it
ran on, BASIC was quite an achievement. Dijkstra could rightfully
complain about having to GOTO
everywhere and all variables being
global, but that was how assembly language worked too, and you weren’t
going to get much better than assembly on 4K of RAM. So I’ll give two
cheers and a raspberry for BASIC, and light a candle in memory of JOSS
and FOCAL.
UPDATE 1/6/2024: I’ve stumbled upon another early BASIC with an immediate mode. SDS 940 BASIC was released in 1967, predating DEC by a bit. This system also had a “Conversational FORTRAN” with an immediate mode.
The 940 was of interest to me because its OS, originally a research project at UC Berkeley known as “Project Genie”, was used by Ken Thompson as an undergrad and introduced several features later seen in Unix. Much of the Project Genie team would end up at Xerox PARC working on the pioneering Alto workstation. Looking at the typewritten manuals for the early Berkeley edition of the OS, there is no mention of a conversational FORTRAN or any kind of BASIC, but there is CAL, a “Conversational Algebraic Language” based on… RAND Corporation’s JOSS.
- To digress into LISP history for a bit: there was an interactive REPL as early as 1960, but it doesn’t appear to have been used much until it became available on time-sharing systems in late 1963 as JOSS was nearing completiion. The seminal LISP 1.5 manual in 1962 presumes you’ll be preparing your program on a deck of punched cards, not typing it at a terminal. The internal implementation of the JOSS language interpreter was clearly inspired by LISP and contemporary list-processing languages, but there’s no record that the interactive environment of the REPL was any kind of factor in the design of JOSS. Well, aside from the fact that John McCarthy only came up with time-sharing because he wanted to run LISP interactively… but anyway. [return]
- Confusingly, DEC numbered its PDP series of computers in order of when they were introduced, without regard to compatibility or capabilities. The PDP-8 was a compatible successor to the PDP-5, but had nothing to do with the PDP-6 or -7. The PDP-10 was an upgrade to the -6, while the -11 was a clean break from all its predecessors. At least it makes chronological sense, this isn’t nearly as baffling as Tandy marketing a long line of mutually incompatible computers as “the TRS-80.” [return]