BASIC-8

Last updated
BASIC-8
Paradigm imperative
Developer DEC
First appeared1969;54 years ago (1969)
OS TSS/8
Influenced by
Dartmouth BASIC
Influenced
BASIC-PLUS, Microsoft BASIC

BASIC-8, is a BASIC programming language for the Digital Equipment (DEC) PDP-8 series minicomputers. It was the first BASIC dialect released by the company, and its success led DEC to produce new BASICs for its future machines, notably BASIC-PLUS for the PDP-11 series. DEC's adoption of BASIC cemented the use of the language as the standard educational and utility programming language of its era, which combined with its small system requirements, made BASIC the major language during the launch of microcomputers in the mid-1970s.

Contents

History

David Ahl joined Digital Equipment's (DEC's) expanding educational sales division in 1969. The division was mostly tasked with selling the PDP-8 minicomputer to high schools and colleges. [1] These were not yet widespread; a typical single-user machine of the late 1960s cost in the order of $10,000 (equivalent to $84,200in 2022), not including mass storage and other peripherals. [2] Around this time, both Hewlett-Packard (HP) and Honeywell had introduced new 16-bit minicomputers with time sharing that were becoming popular in the educational markets. In particular, HP's 16-bit HP 2100 with HP Time-Shared BASIC was very popular leading HP to package it as the HP2000 for sales into the programming and educational markets. [3] Although the HP2000 was even more expensive than the PDP-8, by sharing access among many users, typically up to 16 at a time, the effective cost was much lower than single-user machines.

At the time, DEC was heavily promoting their own language for educational uses, FOCAL, a cut-down version of JOSS. The language had a number of features that allowed it to run in extremely limited memory, including the PDP-8's 4 KB of core memory. It was conceptually similar to BASIC, especially in the interactive method of typing in programs and the general layout of programs. Ahl collected FOCAL programs submitted from users and published them in the department's EDU newsletter. [1]

Ahl found that prospective customers were not interested in FOCAL, at least outside the Boston-area where DEC was located. BASIC was already widely used by this time, and a growing library of educational programs and games in BASIC were becoming available. These were being published in newsletter format, almost always in HP2000 dialect, and the sheer volume of BASIC programs was overwhelming FOCAL. Ahl found no interest on the part DEC management or software development department to produce a BASIC, [2] nor any interest in supporting FOCAL on the other machines in their lineup. He also noted an increasing hostility to the idea of allowing any other company to produce a version of the language. [1]

Concluding a BASIC was required for the PDP-8 to allow it to compete in the educational market, he hired a Brooklyn area programmer to develop one. [1] This became BASIC-8. To aid its uptake, Ahl personally ported over several popular FOCAL programs, notably the games Lunar Lander and The Sumerian Game, which he renamed Hamurabi. [4] BASIC-8 was an immediate best-seller, and by the early 1970s the company was once again a popular choice in educational markets. The company began packaging systems in a fashion similar to the HP2000, with a line of "Edusystems" tailored to different needs. [5]

Although DEC continued to promote FOCAL, use evaporated almost instantly with the release of BASIC-8. DEC would ultimately offer five different BASICs for the PDP-8, each one making up for limitations of the original minimal implementation. With the release of the PDP-11 in 1970, an entirely new and greatly expanded dialect was offered, BASIC-PLUS. [1] Customers complained about the variations between dialects, but Ahl later claimed that if he had been a stickler for such details it would have taken another two years to get the products out. [2]

Ahl had also noticed another curious fact; when they began publishing the EDU newsletter, they expected perhaps 2000 to 3000 subscribers, about 10 each for DEC's 300 educational sites. Within 18 months, circulation had reached 20,000, significantly more than all of the computers in the educational field. When he inquired, he found that many subscribers didn't even have a computer, let alone a DEC one, and were reading it for ideas on how computers might be used in education. This led to early consideration of an independent educational-focused computer magazine. [2] Invariably the most popular section of EDU were the BASIC listings, especially games. This led to his decision to collect the most popular programs, notably Super Star Trek, into book form as 1973's 101 BASIC Games. This sold tens of thousands of copies over three print runs. [1] [6]

In spite of some success on the part of the educational division, at the start of the 1973–1975 recession, DEC decided to reduce the size of the group. When Ahl complained that the division should be left alone, his boss put him on the list of people to be laid off. Even before he received his last paycheck, he was re-hired into a newly-formed hardware group. [6] They produced two small prototype computers, one all-in-one design based on the PDP-8, and a slightly larger system based on the newer PDP-11. Other divisions in the company became concerned these might cut into their own sales and began to agitate against the systems. This ultimately reached the desk of Ken Olsen, who finally stated that he could not understand why anyone might want a computer for their private use. [6] The project was killed. [1]

Ahl left the company and joined AT&T's educational sales department. Ahl had continued publishing EDU before leaving DEC, but with his departure, only one or two more editions were published before the company abandoned it. This left the market to HP, who had by this time had widespread distribution of their BASIC programs in the People's Computer Company newsletter and the rapidly growing Minnesota Educational Computing Consortium (MECC) collection. Noting a lack of a newsletter like EDU aimed specifically at the education market, Ahl soon started Creative Computing magazine and later left AT&T to produce it full-time. [1] In 1975 he purchased the rights to 101 BASIC Games from DEC and re-launched it as BASIC Computer Games . This went on to become the first million-selling computer book. [1] [6]

HP's dialect formed the basis for many early personal computer BASIC implementations, including Integer BASIC and Atari BASIC among others. Bill Gates had used BASIC-PLUS in high school, and this formed the basis for what became Altair BASIC in 1975. Continued development and sales of varieties of Microsoft BASIC for multiple platforms led to DEC's dialect ultimately becoming the de facto standard on home computers rather than HP's version. [1]

Description

Like most versions of BASIC, BASIC-8 could be operated in "immediate mode" where users type in commands and immediately receive a response (like a hand-held calculator), or in "deferred mode", where entries were stored for later execution using the command RUN. Deferred mode is triggered by typing a line number at the start of a line of text. In BASIC-8 the line numbers could range from 1 to 2046; [7] the PDP-8 was a 12-bit machine and normally held a value from −2048 to +2047 in a single word. [8]

As was common in many minimal BASIC implementations of the era, IF statements could only be used to perform a branch; THEN had to be followed by a line number to jump to, it could not contain arbitrary statements as was common in later BASICs. [9] Thus IF X=10 THEN 150 was valid, IF X=10 THEN X=X+1 was not. An alternate form was IF X=10 GO TO 150. The space in GO TO is not optional as it was in some dialects, either in an IF or as a stand-alone statement. [10] Subroutines were supported using GOSUB...RETURN, [11] but could not be called from IF statements. [lower-alpha 1] Loops could be performed with IF...THEN or using FOR...TO...STEP...NEXT. [10]

In contrast to most BASICs, LET was not optional, and had to be used on all assignments. [12] Variable names could be a single letter or a letter and a single digit. [13] DIM can be used to define one and two dimensional arrays. [14] The floating point number format had 8 significant digits and exponents from −38 to +38. [15] Standard math symbols were used for arithmetic, +, -, *, / and ^ (represented on a Teletype Model 33 as an up-arrow), [16] and it included the standard functions SIN, COS, TAN, ATN, EXP, LOG, ABS, SQR, INT, RND and SGN. [17] There was no support for string variables or functions. Boolean comparisons in IF statements included =, <, >, >=, <= and <>. [13] DEF FN was supported for user-defined functions. [18]

PRINT supported both commas and semicolons could be used to space out multiple outputs in tabular format or with no space, respectively. [19] INPUT was supported and could read multiple inputs in a single statement, but prompts were not supported. [20] Lacking file-operating commands, any data within a program could only be entered using DATA statements and read using READ. [21] RESTORE returned the READ back to the start of the DATA list; there was no optional line number as seen in some dialects. [22]

REM, STOP and END round out the command list. [13]

Implementation

In contrast to most competing minicomputer-based systems and early home computers, where BASIC was the entire environment seen by the user, BASIC-8 was one of a number of programs that could be run at the command line of the underlying TSS/8 operating system. [23] As such, commands that would normally be associated with BASIC itself, like RUN or LIST, are not part of the language proper, but part of the shell, and thus cannot be used within programs. This was typical of many early BASIC environments, where the editor and runtime were completely different programs. [24]

BASIC programs could be entered by starting BASIC-8 at the command line and typing, or by starting a text editor like EDIT-8 and typing in the code as a text file. In both cases, the BASIC code was stored as pure text, and retained any extra characters the user typed – one could type in code without spaces to make the file more compact, [7] or add additional spaces to indent loops. [25]

When BASIC was started one could type NEW to clear any existing program, or OLD to load an existing file. At any time, one could SAVE the working file or UNSAVE to delete an existing saved file. CATALOG produced a list of saved program files. [24] LIST printed the source code, and could be limited using two comma-separated values for start and end line numbers, like LIST 10,200. [26] [lower-alpha 2] DELETE deleted a range of lines from the program, RUN started execution, and BYE exited BASIC and returned to the TSS/8 command line. [27]

Internally, the system consisted of five separate sub-programs that were loaded as required in order to minimize memory use. These were EDITOR, COMPILER, LOADER, INTERPRETER and ERROR. COMPILER was not a compiler in the modern sense of the word, as it did not generate lower-level language; in modern terms it would be referred to as a "tokenizer" or front-end. Its purpose was to parse the BASIC source code and convert it into a series of "tokens", one-word numbers representing various keywords and commands. The result was then left in memory while INTERPRETER was instructed to begin running the resulting tokenized code. ERROR mapped error numbers in BASIC to textual output. A table in memory, SYPTBA, held pointers to the locations of the programs on disk. [28]

Notes

  1. Nor was the alternate form "GO SUB" allowed.
  2. The comma-separated syntax was used by a few other dialects like Atari BASIC, but most used the MS BASIC version using a minus sign; LIST 10–200.

Related Research Articles

<span class="mw-page-title-main">BASIC</span> Family of programming languages

BASIC is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College in 1963. They wanted to enable students in non-scientific fields to use computers. At the time, nearly all computers required writing custom software, which only scientists and mathematicians tended to learn.

<span class="mw-page-title-main">Minicomputer</span> Mid-1960s–late-1980s class of smaller computers

A minicomputer, or colloquially mini, is a type of smaller general-purpose computer developed in the mid-1960s and sold at a much lower price than mainframe and mid-size computers from IBM and its direct competitors. In a 1970 survey, The New York Times suggested a consensus definition of a minicomputer as a machine costing less than US$25,000, with an input-output device such as a teleprinter and at least four thousand words of memory, that is capable of running programs in a higher level language, such as Fortran or BASIC.

Tiny BASIC is a family of dialects of the BASIC programming language that can fit into 4 or fewer KBs of memory. Tiny BASIC was designed in response to the open letter published by Bill Gates complaining about users pirating Altair BASIC, which sold for $150. Tiny BASIC was intended to be a completely free version of BASIC that would run on the same early microcomputers.

<span class="mw-page-title-main">RSTS/E</span> Computer operating system

RSTS is a multi-user time-sharing operating system developed by Digital Equipment Corporation for the PDP-11 series of 16-bit minicomputers. The first version of RSTS was implemented in 1970 by DEC software engineers that developed the TSS-8 time-sharing operating system for the PDP-8. The last version of RSTS was released in September 1992. RSTS-11 and RSTS/E are usually referred to just as "RSTS" and this article will generally use the shorter form. RSTS-11 supports the BASIC programming language, an extended version called BASIC-PLUS, developed under contract by Evans Griffiths & Hart of Boston. Starting with RSTS/E version 5B, DEC added support for additional programming languages by emulating the execution environment of the RT-11 and RSX-11 operating systems.

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 (DTSS), it offered an interactive programming environment to all undergraduates as well as the larger university community.

<span class="mw-page-title-main">Lunar Lander (video game genre)</span> Moon landing simulation games

Lunar Lander is a genre of video games loosely based on the 1969 landing of the Apollo Lunar Module on the Moon. In Lunar Lander games, players generally control a spacecraft as it falls toward the surface of the Moon or other astronomical body, using thrusters to slow the ship's descent and control its horizontal motion to reach a safe landing area. Crashing into obstacles, hitting the surface at too high a velocity, or running out of fuel all result in failure. In some games in the genre, the ship's orientation must be adjusted as well as its horizontal and vertical velocities.

BASIC-PLUS is an extended dialect of the BASIC programming language that was developed by Digital Equipment Corporation (DEC) for use on its RSTS/E time-sharing operating system for the PDP-11 series of 16-bit minicomputers in the early 1970s through the 1980s.

<i>Star Trek</i> (1971 video game) 1971 video game

Star Trek is a text-based strategy video game based on the Star Trek television series (1966–69) and originally released in 1971. In the game, the player commands the USS Enterprise on a mission to hunt down and destroy an invading fleet of Klingon warships. The player travels through the 64 quadrants of the galaxy to attack enemy ships with phasers and photon torpedoes in turn-based battles and refuel at starbases. The goal is to eliminate all enemies within a random time limit.

<span class="mw-page-title-main">Type-in program</span> Software whose source code is entered by the user

A type-in program or type-in listing was computer source code printed in a home computer magazine or book. It was meant to be entered via the keyboard by the reader and then saved to cassette tape or floppy disk. The result was a usable game, utility, or application program.

FOCAL is an interactive interpreted programming language based on JOSS and mostly used on Digital Equipment Corporation (DEC) Programmed Data Processor (PDP) series machines.

<span class="mw-page-title-main">Vilnius BASIC</span> Dialect of the BASIC programming language

Vilnius BASIC, sometimes known as BK BASIC, is a dialect of the BASIC programming language running on the Elektronika BK-0010-01/BK-0011M and UKNC computers. It was developed at Vilnius University, located in Lithuania which was a republic of the Soviet Union at the time.

VSI BASIC for OpenVMS is the latest name for a dialect of the BASIC programming language created by Digital Equipment Corporation (DEC) and now owned by VMS Software Incorporated (VSI). It was originally developed as BASIC-PLUS in the 1970s for the RSTS-11 operating system on the PDP-11 minicomputer. It was later ported to OpenVMS, first on VAX, then Alpha, and most recently Integrity.

CAL, short for Conversational Algebraic Language, was a programming language and system designed and developed by Butler Lampson at Berkeley in 1967 for the SDS 940 mainframe computer. CAL is a version of the seminal JOSS language with several cleanups and new features to take advantage of the SDS platform.

HP Time-Shared BASIC is a BASIC programming language interpreter for Hewlett-Packard's HP 2000 line of minicomputer-based time-sharing computer systems. TSB is historically notable as the platform that released the first public versions of the game Star Trek.

<i>Creative Computing</i> (magazine) Periodical literature

Creative Computing was one of the earliest magazines covering the microcomputer revolution. Published from October 1974 until December 1985, the magazine covered the spectrum of hobbyist/home/personal computing in a more accessible format than the rather technically oriented Byte.

<i>Hamurabi</i> (video game) 1968 video game

Hamurabi is a text-based strategy video game of land and resource management. It was first developed under the name King of Sumeria or The Sumer Game by Doug Dyment in 1968 at Digital Equipment Corporation as a computer game for fellow employee Richard Merrill's newly invented FOCAL programming language.

<i>BASIC Computer Games</i>

BASIC Computer Games is a compilation of type-in computer games in the BASIC programming language collected by David H. Ahl. Some of the games were written or modified by Ahl as well. Among its better-known games are Hamurabi and Super Star Trek.

Mainframe computers are computers used primarily by businesses and academic institutions for large-scale processes. Before personal computers, first termed microcomputers, became widely available to the general public in the 1970s, the computing industry was composed of mainframe computers and the relatively smaller and cheaper minicomputer variant. During the mid to late 1960s, many early video games were programmed on these computers. Developed prior to the rise of the commercial video game industry in the early 1970s, these early mainframe games were generally written by students or employees at large corporations in a machine or assembly language that could only be understood by the specific machine or computer type they were developed on. While many of these games were lost as older computers were discontinued, some of them were ported to high-level computer languages like BASIC, had expanded versions later released for personal computers, or were recreated for bulletin board systems years later, thus influencing future games and developers.

<span class="mw-page-title-main">BASIC interpreter</span> Interpreter that enables users to enter and run programs in the BASIC language

A BASIC interpreter is an interpreter that enables users to enter and run programs in the BASIC language and was, for the first part of the microcomputer era, the default application that computers would launch. Users were expected to use the BASIC interpreter to type in programs or to load programs from storage.

Minimal BASIC is a dialect of the BASIC programming language developed as an international standard. The effort started at ANSI in January 1974, and was joined in September by a parallel group at ECMA. The first draft was released for comments in January 1976 and the final standard, known alternately as ANSI X3.60-1978 or ECMA-55, was published in December 1977. The US Bureau of Standards introduced the NBSIR 77-1420 test suite to ensure implementations met the definition.

References

Citations

  1. 1 2 3 4 5 6 7 8 9 10 Ahl 2013.
  2. 1 2 3 4 Anderson 1984, p. 70.
  3. "Hewlett/Packard Computers". The 2000A was the first HP 2000 time share system on the market ca. 1969
  4. McCracken, Harry (29 April 2014). "Fifty Years of BASIC, the Programming Language That Made Computers Personal". Time.
  5. edusystem handbook (PDF). DEC. January 1973.
  6. 1 2 3 4 Anderson 1984, p. 72.
  7. 1 2 Manual 1969, p. 2.2.
  8. "DEC's Blockbuster: The PDP-8". Computer History Museum.
  9. Manual 1969, p. 2.15.
  10. 1 2 Manual 1969, p. 2.16.
  11. Manual 1969, p. 3.6.
  12. Manual 1969, p. 2.13.
  13. 1 2 3 Manual 1969, p. 2.8.
  14. Manual 1969, pp. 2.11, 2.17.
  15. Manual 1969, p. 2.7.
  16. Manual 1969, p. 2.5.
  17. Manual 1969, p. 2.6.
  18. Manual 1969, p. 3.5.
  19. Manual 1969, p. 3.1.
  20. Manual 1969, p. 3.7.
  21. Manual 1969, p. 2.4.
  22. Manual 1969, p. 3.9.
  23. Manual 1969, p. 1.1.
  24. 1 2 Manual 1969, p. 4.1.
  25. Manual 1969, p. 2.12.
  26. Manual 1969, p. 4.2.
  27. Manual 1969, p. B.1.
  28. Manual 1969, p. D.1.

Bibliography