Benton Harbor BASIC

Last updated
Benton Harbor BASIC
Family BASIC
Designed by Gordon Letwin
Developer Wintek, Heathkit
First appeared1978;45 years ago (1978)
Platform Heathkit H8
OS HDOS
License Commercial proprietary software
Influenced by
Dartmouth BASIC

Benton Harbor BASIC and Extended Benton Harbor BASIC were two versions of the BASIC programming language written by Heathkit for their H8 microcomputers. The BASICs were patterned on Dartmouth BASIC, and thus differ in some respects from the many Microsoft BASIC clones of the late-1970s era. The two differ from each other in that the former was able to run in machines with only 8 kB of main memory and only supported string constants, while Extended required 12 kB and added string variables and additional features. It is named after the town where Heathkit was located. [1]

Contents

History

Heathkit had been watching the emerging microcomputer field since 1974, but at the time, they could not figure out what any of the traditional Heath customers would use one for. Attitudes changed when MITS introduced the Altair 8800 kit in January 1975 and it was a runaway bestseller. Heathkit began a program to develop their own kit that would be much superior to the Altair, [2] which was known to have poor reliability due to a number of design decisions. [lower-alpha 1] The concept of building a computer remained a heated issue in the company, but started moving forward after one engineer stated "All right, we'll build a computer. But we're not going to get involved in software!" [2]

The idea of not getting involved in software quickly revealed itself as a bad one. Although the new design was largely a cleaned up Altair, or S-100 bus design as they were known by this time, it differed enough that software for the Altair would not run without conversion. This would leave the prospective owner will little or nothing to do with their computer. [3] The decision was made to sell the systems with at least some fundamental programs, but no one in the company had any software experience. [3]

The company contacted Wintek of Lafayette, Indiana to write a suite of programs for the system. Wintek sent one of their programmers, Gordon Letwin, to the Heath headquarters in Benton Harbor, Michigan to meet with them. The project lead at Heath, Louis Frenzel, recounted that Letwin once arrived for a business meeting with long hair, high-top sneakers and a velvet coat. In spite of his surprise at Letwin's appearance, Frenzel quickly realized Letwin knew what he was doing and decided to hire him directly. [3]

Letwin's first project was HDOS, an operating system for the platform. With this completed, he began work on BASIC. The first versions were extremely simple, supporting only the most basic functionality, limited to 6 digits of precision, lacking string manipulation, [3] and only allowing a single statement per line. [4] This version shipped with all H8 systems. For $10, the user could also purchase Extended BASIC, which started at Version 10, which added string variables and various additional functions. [5]

The system was not particularly well reviewed. One review called it "medium quality" and expressed concern about how slow it was, some 10 times slower than North Star BASIC. [6] Additionally, in spite of Heath's claims that Extended offered improved performance, benchmarking by one user demonstrated that most operations were either identical in speed or slightly slower, with the exception of some math functions like square root. [7]

Description

Program editing

Like most BASICs of the era, the system could be used in either interactive or program mode, or as it was known at the time, immediate mode and deferred mode. Heath refers to these as command mode and program mode. Statements entered without a line number, in command mode, were run immediately. Those with a number at the front were put into the appropriate place in the program storage, possibly replacing an existing line with the same number. In contrast to later home computer versions, the H8 did not assume any sort of cursor addressable display, so editing the code had to be done by re-entering the entire line at the * prompt. [8] Line numbers could be between 1 and 65,535, [9] and any single line could be up to 80 characters in the base version, and 100 in Extended. [8]

One advanced feature of the system was that it offered an autocomplete system. As the initial command is being typed in, as soon as it can be uniquely identified, the system will insert the entire word immediately. [10] Although some other dialects like Sinclair BASIC offered similar features, they did so using special keystrokes or characters that performed the replacement.

Statements and commands

Statements were split into groups: those that could only be used in command mode, and thus known as commands, and those that could be used in command or program mode. Among those that could only be used in command mode were: RUN, CONTINUE if it was paused, and SCRATCH rather than the more common NEW to erase a program— (SCRATCH was used in a number of contemporary BASICs). Programs were saved using DUMP instead of SAVE, but loaded using LOAD. Files had long filenames and could be VERIFY after DUMPing. [11]

Statements that could be used in command or program mode represented the majority of the language. Among these were the common IF...THEN and the equivalent IF...GOTO seen on a few other systems, FOR...NEXT...STEP, DIM for 1 or 2 dimensions, GOSUB...RETURN, GOTO with the ability to use variables as well as line number constants, the optional LET, LIST which could only list a single line or the entire program, ON...GOTO and ON...GOSUB computed branches, PEEK and POKE, PRINT, READ...DATA and RESTORE. A number of statements seen in most dialects of the era were missing, including STOP, END, DEF FN and REM. INPUT was supported with a single optional prompt, and if the prompt was there, the question mark that would normally appear was suppressed. This could also be triggered by entering no prompt string and just the semicolon separator. [12] An addition was the PAUSE command, seen in a few dialects, that stopped execution until a key was pressed. [13]

Math operators were standard; +, -, *, / and ^. Logical operators were likewise standard; =, <, >, <=, >= and <>. [14] Boolean operators included NOT, AND and OR. [15]

Functions were largely standard as well, including ABS, ATN, ABS, COS, EXP, INT which was a truncate, not a floor as is the case in most versions, LOG, POS which returned the cursor position, RND, SGN, SIN, SQR, SPC that output a number of space characters and TAB to move to a particular column, FRE to print the amount of free memory and USR to call assembler language routines. [16] Random numbers were based on a series; RND(0) would return the last number without advancing the series, RND(-1) reseeded, and any positive value in the parameter returned the next value in the series. [17]

There were also a number of additional special purpose functions and commands, including PAD which returns the value of the key being held down on the front panel's keypad, and SEG which converted the key value from PAD into a digit that could then be POKEd to the 7-segment display. [18] [19] Like Altair BASIC, Benton Harbor also included the OUT statement to write a value to a port number, as the Intel 8080 used numbered I/O ports. [19]

Variables could have a single character or a single character and one digit - two letter names were not allowed. [20]

Extended BASIC

Extended BASIC's primarily notable addition was string variables and a number of functions to operate on strings. String variables were indicated with the $ sign, as in most dialects, and could hold up to 256 characters. [20] String functions included the standard CHR$, STR$, LEFT$, RIGHT$, MID$, ASC and VAL. [21] Concatenation was performed with +. [15] Extended also supported LINE INPUT which read the entire line as a single string instead of interpreting spaces as separators between values. [22]

Another change was that the FRE function supplanted with the command FREE, which printed out a detailed table showing the memory use. PAUSE was modified to take an optional value that would exit the pause state after that amount of time. The internal clock was updated every other millisecond, so this value was in units of 2 ms. The new PORT statement allowed the output of PRINT to be directed to a different device, which made outputting text much easier than using OUT and looping over the string. [13]

Extended also added a number of features intended to make programming easier. Notable was the addition of a second comma-separated input to allow listing a range of lines, like LIST 10,500, also seen on some other dialects like Atari BASIC. Others included BUILD, which in most dialects would be called AUTO, which turned on automatic line numbering. For instance, BUILD 100,10 would result in a "100" being printed automatically after the line was entered, and then every line entered would increment the number by 10; 100, 110, 120 etc. This was turned off by pressing control-C. [23] DELETE allowed a range of lines to be deleted, using the same range format as LIST. [24]

Another addition was the CNTRL command, which had a variety of settings based on a list of numbered entries. CNTRL 0,500, for "setting zero", would set up the system to respond to control-B keypresses by performing a GOSUB to line, in this case, 500. Setting 1 set the number of digits before it would switch to exponent format, 2 controls the updates to the front-panel LED display, 3 sets the width of the "print zones" that are used when printing a list separated by commas (normally 14 characters), and 4 turns the hardware clock on or off. [25] Turning the clock off can speed up programs by as much as 15%. [26]

Finally, a small number of new math functions were added, including MAX and MIN which were provided with a comma-delimited list of number of values, and TAN. [27]

Notes

  1. For a lengthy discussion by the original designers on some of these issues, see the S-100 Bus termination and legacy support page.

Related Research Articles

BASIC09 is a structured BASIC programming language dialect developed by Microware on behalf of Motorola for the then-new Motorola 6809 CPU and released in February 1980. It is primarily used with the OS-9 operating system, released in 1979. Microware also released a version for OS-9/68k on the 68000 as Microware 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">PEEK and POKE</span> Commands in some high-level programming languages

In computing, PEEK and POKE are commands used in some high-level programming languages for accessing the contents of a specific memory cell referenced by its memory address. PEEK gets the byte located at the specified memory address. POKE sets the memory byte at the specified address. These commands originated with machine code monitors such as the DECsystem-10 monitor; these commands are particularly associated with the BASIC programming language, though some other languages such as Pascal and COMAL also have these commands. These commands are comparable in their roles to pointers in the C language and some other programming languages.

Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers. Originally available on cassette for the Apple I in 1976, then included in ROM on the Apple II from its release in 1977, it was the first version of BASIC used by many early home computer owners.

Sinclair BASIC is a dialect of the programming language BASIC used in the 8-bit home computers from Sinclair Research, Timex Sinclair and Amstrad. The Sinclair BASIC interpreter was written by Nine Tiles Networks Ltd.

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.

In computing, a line number is a method used to specify a particular sequence of characters in a text file. The most common method of assigning numbers to lines is to assign every line a unique number, starting at 1 for the first line, and incrementing by 1 for each successive line.

<span class="mw-page-title-main">Heathkit</span> Brand name of kits and other electronic products produced and marketed by the Heath Company

Heathkit is the brand name of kits and other electronic products produced and marketed by the Heath Company. The products over the decades have included electronic test equipment, high fidelity home audio equipment, television receivers, amateur radio equipment, robots, electronic ignition conversion modules for early model cars with point style ignitions, and the influential Heath H-8, H-89, and H-11 hobbyist computers, which were sold in kit form for assembly by the purchaser.

<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.

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.

HDOS is an early microcomputer operating system, originally written for the Heathkit H8 computer system and later also available for the Heathkit H89 and Zenith Z-89 computers. The author was Heath Company employee Gordon Letwin, who later was an early employee of Microsoft and lead architect of OS/2.

<span class="mw-page-title-main">Heathkit H8</span>

Heathkit's H8 is an Intel 8080A-based microcomputer sold in kit form starting in 1977. The H8 is similar to the S-100 bus computers of the era, and like those machines is often used with the CP/M operating system on floppy disk.

North Star BASIC was a dialect of the BASIC programming language for the Intel 8080 microprocessor used on the North Star Horizon and available for purchase on other S-100 bus machines of the late 1970s.

SCELBAL, short for SCientific ELementary BAsic Language, is a version of the BASIC programming language released in 1976 for the SCELBI and other early Intel 8008 and 8080-based microcomputers like the Mark-8. Later add-ons to the language included an extended math package and string handling. The original version required 8 kB of RAM, while the additions demanded at least 12 kB.

SUPER BASIC, sometimes SBASIC for short, is an advanced dialect of the BASIC programming language offered on Tymshare's SDS 940 systems starting in 1968 and available well into the 1970s.

Data General Extended BASIC, also widely known as Nova Extended BASIC, was a BASIC programming language interpreter for the Data General Nova series minicomputers. It was based on the seminal Dartmouth BASIC, including the Fifth Edition's string variables and powerful MAT commands for matrix manipulation. In contrast to the compile-and-go Dartmouth BASIC, Extended BASIC was an interpreter.

<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.

Wang BASIC is a series of BASIC programming languages for computers from Wang Laboratories. The term can be used to refer to the BASIC on any Wang machine, but is mostly associated with the versions on the Wang 2200 minicomputer series of the early 1970s. When these machines were updated to the VP series in 1976, BASIC-2 was introduced and remained the pattern for future machines in the 2200 series. A planned BASIC-3 was never released.

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.

Acorn System BASIC and Atom BASIC are two closely related dialects of the BASIC programming language developed by Acorn Computers for their early microcomputers like the Acorn System 3 and Acorn Atom. Developed in-house, they have a number of significant idiosyncrasies compared to most BASIC dialects of the home computer era.

References

Citations

  1. Surden 1977, p. 35.
  2. 1 2 Zimmerman 1982, p. 16.
  3. 1 2 3 4 Zimmerman 1982, p. 17.
  4. Moore 1981, p. 122.
  5. Poduska 1979, p. 134.
  6. Moore 1981, p. 125.
  7. Poduska 1979, pp. 134, 135.
  8. 1 2 Manual 1980, p. 5.74.
  9. Manual 1980, p. 5.25.
  10. Manual 1980, p. 5.72.
  11. Manual 1980, pp. 5.27–5.32.
  12. Manual 1980, p. 5.59.
  13. 1 2 Manual 1980, p. 5.89.
  14. Manual 1980, p. 5.84.
  15. 1 2 Manual 1980, p. 5.85.
  16. Manual 1980, p. 5.66.
  17. Manual 1980, p. 5.91.
  18. Manual 1980, pp. 5.64–5.65.
  19. 1 2 Poduska 1979, p. 135.
  20. 1 2 Manual 1980, p. 5.83.
  21. Manual 1980, p. 5.70.
  22. Manual 1980, p. 5.60.
  23. Manual 1980, p. 5.27.
  24. Manual 1980, p. 5.28.
  25. Manual 1980, pp. 5.34–5.36.
  26. Poduska 1979, p. 35.
  27. Manual 1980, p. 5.92.

Bibliography

Further reading