Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Benton Harbor BASIC

From Wikipedia, the free encyclopedia
Dialect of the BASIC programming language
Benton Harbor BASIC
FamilyBASIC
Designed byGordon Letwin
DeveloperWintek, Heathkit
First appeared1978; 48 years ago (1978)
PlatformHeathkit H8
OSHDOS
LicenseCommercialproprietary software
Influenced by
Dartmouth BASIC

Benton Harbor BASIC andExtended Benton Harbor BASIC were two versions of theBASIC programming language written byHeathkit for theirH8microcomputers. The BASICs were patterned onDartmouth BASIC, and thus differ in some respects from the manyMicrosoft 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 ofmain memory and only supported string constants, while Extended required 12 kB and addedstring variables and additional features. It is named after the town where Heathkit was located.[1]

History

[edit]

Heathkit had been watching the emergingmicrocomputer 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 whenMITS introduced theAltair 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.[a] 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, orS-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 ofLafayette, Indiana to write a suite of programs for the system. Wintek sent one of their programmers,Gordon Letwin, to the Heath headquarters inBenton 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 wasHDOS, anoperating 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 thanNorth 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]

Zenith Data Systems shipped Benton Harbor BASIC with theZenith Z-89/Heathkit H89, which is compatible with H8 software.[8]

Description

[edit]

Program editing

[edit]

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 laterhome 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.[9] Line numbers could be between 1 and 65,535,[10] and any single line could be up to 80 characters in the base version, and 100 in Extended.[9]

One advanced feature of the system was that it offered anautocomplete 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.[11] Although some other dialects likeSinclair BASIC offered similar features, they did so using specialkeystrokes or characters that performed the replacement.

Statements and commands

[edit]

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, andSCRATCH rather than the more commonNEW to erase a program— (SCRATCH was used in a number of contemporary BASICs). Programs were saved usingDUMP instead ofSAVE, but loaded usingLOAD. Files had long filenames and could beVERIFY after DUMPing.[12]

Statements that could be used in command or program mode represented the majority of the language. Among these were the commonIF...THEN and the equivalentIF...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 optionalLET,LIST which could only list a single line or the entire program,ON...GOTO andON...GOSUBcomputed branches,PEEK andPOKE,PRINT,READ...DATA andRESTORE. A number of statements seen in most dialects of the era were missing, includingSTOP,END,DEF FN andREM.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.[13] An addition was thePAUSE command, seen in a few dialects, that stopped execution until a key was pressed.[14]

Math operators were standard;+,-,*,/ and^. Logical operators were likewise standard;=,<,>,<=,>= and<>.[15] Boolean operators includedNOT,AND andOR.[16]

Functions were largely standard as well, includingABS,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 andTAB to move to a particular column,FRE to print the amount of free memory andUSR to callassembler language routines.[17] 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.[18]

There were also a number of additional special purpose functions and commands, includingPAD which returns the value of the key being held down on the front panel'skeypad, andSEG which converted the key value from PAD into a digit that could then be POKEd to the 7-segment display.[19][20] LikeAltair BASIC, Benton Harbor also included theOUT statement to write a value to a port number, as theIntel 8080 used numbered I/O ports.[20]

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

Extended BASIC

[edit]

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.[21] String functions included the standardCHR$,STR$,LEFT$,RIGHT$,MID$,ASC andVAL.[22] Concatenation was performed with+.[16] Extended also supportedLINE INPUT which read the entire line as a single string instead of interpreting spaces as separators between values.[23]

Another change was that theFRE function supplanted with the commandFREE, 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 newPORT 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.[14]

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, likeLIST 10,500, also seen on some other dialects likeAtari BASIC. Others includedBUILD, which in most dialects would be calledAUTO, 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 pressingcontrol-C.[24]DELETE allowed a range of lines to be deleted, using the same range format asLIST.[25]

Another addition was theCNTRL 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.[26] Turning the clock off can speed up programs by as much as 15%.[27]

Finally, a small number of new math functions were added, includingMAX andMIN which were provided with a comma-delimited list of number of values, andTAN.[28]

Notes

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

References

[edit]

Citations

[edit]
  1. ^Surden 1977, p. 35.
  2. ^abZimmerman 1982, p. 16.
  3. ^abcdZimmerman 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. ^Moore 1981, p. 116.
  9. ^abManual 1980, p. 5.74.
  10. ^Manual 1980, p. 5.25.
  11. ^Manual 1980, p. 5.72.
  12. ^Manual 1980, pp. 5.27–5.32.
  13. ^Manual 1980, p. 5.59.
  14. ^abManual 1980, p. 5.89.
  15. ^Manual 1980, p. 5.84.
  16. ^abManual 1980, p. 5.85.
  17. ^Manual 1980, p. 5.66.
  18. ^Manual 1980, p. 5.91.
  19. ^Manual 1980, pp. 5.64–5.65.
  20. ^abPoduska 1979, p. 135.
  21. ^abManual 1980, p. 5.83.
  22. ^Manual 1980, p. 5.70.
  23. ^Manual 1980, p. 5.60.
  24. ^Manual 1980, p. 5.27.
  25. ^Manual 1980, p. 5.28.
  26. ^Manual 1980, pp. 5.34–5.36.
  27. ^Poduska 1979, p. 35.
  28. ^Manual 1980, p. 5.92.

Bibliography

[edit]

Further reading

[edit]
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
Retrieved from "https://en.wikipedia.org/w/index.php?title=Benton_Harbor_BASIC&oldid=1334375187"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp