Dartmouth BASIC
Dartmouth BASIC is the original version of the BASIC programming language. It was designed by two professors at Dartmouth College, John G. Kemeny and Thomas E. Kurtz. With the underlying Dartmouth Time-Sharing System, it offered an interactive programming environment to all undergraduates as well as the larger university community.
Several versions were produced at Dartmouth, implemented by undergraduate students and operating as a compile and go system. The first version ran on 1 May 1964, and it was opened to general users in June. Upgrades followed, culminating in the seventh and final release in 1979. Dartmouth also introduced a dramatically updated version known as Structured BASIC in 1975, which added various structured programming concepts. SBASIC formed the basis of the American National Standards Institute-standard Standard BASIC efforts in the early 1980s.
Most dialects of BASIC trace their history to the Fourth Edition, but generally leave out more esoteric features like matrix math. In contrast to the Dartmouth compilers, most other BASICs were written as interpreters. This decision allowed them to run in the limited main memory of early microcomputers. Microsoft BASIC is one example, designed to run in only 4 KB of memory. By the late 1980s, tens of millions of home computers were running some variant of the MS interpreter. It became the de facto standard for BASIC, which led to the abandonment of the ANSI SBASIC efforts. Kemeny and Kurtz later formed a company to develop and promote a version of SBASIC known as True BASIC.
Many early mainframe games trace their history to Dartmouth BASIC and the DTSS system. A selection of these were collected, in HP Time-Shared BASIC versions, in the People's Computer Company book What to Do After You Hit Return. Many of the original source listings in BASIC Computer Games and related works also trace their history to Dartmouth BASIC.
Development history
Earlier work
joined the mathematics department of Dartmouth College in 1953 and later became its department chairman. In 1956 he gained access to an IBM 704 via MIT's New England Regional Computer Center efforts. That year, he wrote the DARSIMCO language, a version of assembler which simplified the programming of mathematical operations. He was aided by Thomas E. Kurtz, who joined the department that year.DARSIMCO was forgotten when the first FORTRAN compiler was installed on the machine in 1957. The arrival of FORTRAN instilled an important lesson. Kurtz, having been indoctrinated that FORTRAN was slow, spent several months writing a program in 704 assembler which had taken up about an hour of CPU time to debug and still was not running. Giving up, he rewrote it in FORTRAN and had it running in five minutes. The lesson was that high-level languages could save time, regardless of their measured performance.
In 1959, the school received its first computer, the drum-based LGP-30. One student wrote a FORTRAN-inspired language called DART for the machine. This led to an effort to produce an ALGOL 58 compiler, turning to ALGOL 60 when that definition was finalized. Writing the compiler was difficult due to the very small memory size, 32 KB in modern terms, and was extremely slow, based on the drum speed of 3600 rpm. Nevertheless, they were able to produce a functional cut-down version known as ALGOL 30. Further development produced SCALP, the "Self-Contained Algol Processor", a one-pass compiler that was ready to run the compiled program as soon as the punched tape finished reading in the source. Output with the program results or any error messages would immediately appear. This compile-and-go style of operation would later be used by BASIC.
In 1962, Kemeny and high-school student Sidney Marshall began experimenting with a new language, DOPE. This used numbered lines to represent instructions, for instance, to add two numbers, DOPE used:
5 + A B C
Which meant "on line 5, perform an addition of the values in variables A and B and put the result in C". Although somewhat cryptic in layout, the basis for the future BASIC language can be seen. In addition to basic mathematical operations, the language included SQR, EXP, LOG, SIN and a simple branching construct.
Computing in liberal arts
Kemeny and Kurtz agreed on the need for programming literacy among students outside the traditional STEM fields; only 25% of the students at Dartmouth took STEM-related courses, but some level of mathematics was used in almost every field. Moreover, as computers became more important in society, they wondered "How can sensible decisions about computing and its use be made by persons essentially ignorant of it?"Kemeny later noted that "Our vision was that every student on campus should have access to a computer, and any faculty member should be able to use a computer in the classroom whenever appropriate. It was as simple as that." But doing so would be largely impossible given what they had to work with; the turnaround on a typical SCALP run was about 15 minutes, and the languages were far too difficult for non-STEM users to use for basic tasks.
It was not simply the complexity that was a problem, it was the entire concept of the batch processing. Students would prepare their programs on punch cards or paper tape, submit them to the computer operators, and then at some future point receive their output. This would often reveal an error that required the entire process to be repeated. As they later put it, "If it takes on the order of 1 day for one try, the student will either lose interest or forget what the problems were. At best, he will waste time standing around waiting for the day's results to appear."
In 1959, due largely to Kemeny's reputation as an innovator in math teaching, the department won an Alfred P. Sloan Foundation award for $500,000 to build a new department building.
Developing the concept
During a 1961 visit to MIT, they were introduced to the PDP-1 and its recently completed experimental time-sharing operating system. John McCarthy asked Kurtz why they did not use time sharing for their efforts to bring computing to the masses. Kurtz returned to Dartmouth and told Kemeny "we should do time sharing", to which Kemeny immediately replied "OK".In an experiment to test whether the concept was workable, students were broken into groups of five and given turns on the LGP-30 using SCALP. Computer time was broken into 15-minute sessions and each group of five was given one session and then turned it over to the next group. It was found that students could generally complete their programs in two or three "turnarounds" during a single session. This clearly suggested that an interactive system would allow hundreds of users to successfully use a single machine.
The arrival of the Teletype Model 33 teleprinter using the newly introduced ASCII over telephone lines solved the problem of access; no longer would the programmers have to submit the programs on cards or paper tape, they would now use the Model 33 to type directly into the computer. All that was needed was a new machine that was fast enough to host a time-sharing system, and a simple language for the programmers to use.
When the topic of a simple language began to be considered seriously, Kemeny immediately suggested writing a new one. Kurtz was more interested in a cut-down version of FORTRAN or ALGOL. But these languages had so many idiosyncrasies that Kurtz came to agree with Kemeny:
Over time, four key elements emerged; the system would use time-sharing, a new language would be needed, to get users onto the system new courses would introduce programming as an adjunct to other subjects, and finally, the terminals would be open to all users.
Initial version
The project officially started in September 1963. The goal was to develop the language and operating system on an off-the-shelf computer. In early 1964, they approached the National Science Foundation for funding. The NSF sent the proposals, one for the time sharing system and another for the language, out for peer review. The reviews invariably suggested they did not understand the difficulty of what they were attempting. In spite of these negative comments, the NSF went ahead with both grants. Educational discounts available from General Electric led to the purchase of a GE-225 computer, in an era when not "going IBM" was still fraught with peril.The GE-225 was paired with the much simpler DATANET-30 machine and a hard drive connected to both machines in order to share programs. The DN-30 lacked any programming documentation at the time, as it was never intended to be shipped from the factory without a program already installed. It included one key feature, direct memory access access to the larger GE machines. This meant small messages could be quickly passed back and forth between the machines, allowing commands typed by the user to be immediately performed by the 225.
The system would work by having the DN-30 run the terminals and save the user's work to the disk. When the user typed
RUN, the DN-30 would use DMA to send that command to the GE-225. The 225 would read that file, compile it, run it, and pass back the results to the DN-30 which would print the output on the terminal.In the summer of 1963, pending the purchase of the computer, GE provided access to one of their GE-225s. Kemeny began working on a prototype compiler. Students Michael Busch and John McGeachie began working on the operating system design that fall. Both the language and the OS were extensively modified during this period, although the basic goals remained the same and were published in a draft form that November.
The school's machine arrived in the last week of February 1964, was operational by mid-March, and officially handed over on 1 April. By that point, the operating system design was already well developed. Most of the student programmers working on the operating system did so for 50 hours a week, in addition to their normal course load. The language was developed in parallel on borrowed time on another 225 machine. The OS was completed in April, and the entire system running on three Model 33 terminals was ready by the end of the month. John Kemeny and John McGeachie ran the first BASIC program on 1 May 1964 at 4 a.m. ET.
It is not completely clear what the first programs were. Many sources, including Dartmouth, claim it was this simple program:
PRINT 2 + 2
A later history of the language states that two programs were typed in at the same time, one by Kemeny and one by another unnamed programmer. They typed in their programs, typed at the same time, and received the correct results. Kurtz was an early riser and had already gone home and "missed all the fun."
Over the next month the system was tested by having a numerical analysis class test programs on the system. During this period, the machine remained running properly for an average of five minutes. The problems were rapidly addressed, and in June it was decided to increase the number of terminals to eleven. It was around this time that a faster GE-235 replaced the 225. By the fall, 20 terminals were in use.
GE began to refer to the combination of GE-235 and DN-30 as the GE-265, adding their model numbers together. GE built about 75 additional examples of the GE-265, many for their service bureau business. GE referred to these as their Mark I time-sharing systems.