Minimal BASIC is a dialect of the
BASIC
BASIC (Beginners' All-purpose Symbolic Instruction Code) 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 ...
programming language developed as an
international standard
international standard is a technical standard developed by one or more international standards organizations. International standards are available for consideration and use worldwide. The most prominent such organization is the International Or ...
. The effort started at
ANSI in January 1974, and was joined in September by a parallel group at
ECMA
Ecma International () is a nonprofit standards organization for information and communication systems. It acquired its current name in 1994, when the European Computer Manufacturers Association (ECMA) changed its name to reflect the organizatio ...
. 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
In software development, a test suite, less commonly known as a validation suite, is a collection of test cases that are intended to be used to test a software program to show that it has some specified set of behaviors. A test suite often contai ...
to ensure implementations met the definition.
By this time,
Microsoft BASIC
Microsoft BASIC is the foundation software product of the Microsoft company and evolved into a line of BASIC interpreters and compiler(s) adapted for many different microcomputers. It first appeared in 1975 as Altair BASIC, which was the first ve ...
was beginning to take over the market after its introduction on early
microcomputer
A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (PC ...
s in 1975, and especially after the introduction of the 1977 "trinity" - the
Apple II
The Apple II (stylized as ) is an 8-bit home computer and one of the world's first highly successful mass-produced microcomputer products. It was designed primarily by Steve Wozniak; Jerry Manock developed the design of Apple II's foam-m ...
,
Commodore PET and
TRS-80
The TRS-80 Micro Computer System (TRS-80, later renamed the Model I to distinguish it from successors) is a desktop microcomputer launched in 1977 and sold by Tandy Corporation through their Radio Shack stores. The name is an abbreviation of '' ...
, all of which would cement MS-style BASICs as the ''de facto'' standard.
ISO
ISO is the most common abbreviation for the International Organization for Standardization.
ISO or Iso may also refer to: Business and finance
* Iso (supermarket), a chain of Danish supermarkets incorporated into the SuperBest chain in 2007
* Iso ...
standardization of Minimal BASIC began as ISO 6373:1984 but was abandoned in 1998. An effort to produce a more powerful dialect,
Full BASIC
Full BASIC, sometimes known as Standard BASIC or ANSI BASIC, is an international standard defining a dialect of the BASIC programming language. It was developed by the American National Standards Institute (ANSI) X3.60 group in partnership with the ...
(also known as Standard BASIC), was not released until January 1987 and had little impact on the market.
History
Previous developments
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 (DTSS), it offered an inter ...
was introduced in May 1964 at
Dartmouth College
Dartmouth College (; ) is a private research university in Hanover, New Hampshire. Established in 1769 by Eleazar Wheelock, it is one of the nine colonial colleges chartered before the American Revolution. Although founded to educate Native A ...
as a cleaned up, interactive language inspired by
FORTRAN. The system brought together several concepts which were hot topics in the computer industry at the time, notably
timesharing
In computing, time-sharing is the sharing of a computing resource among many users at the same time by means of multiprogramming and multi-tasking.DEC Timesharing (1965), by Peter Clark, The DEC Professional, Volume 1, Number 1
Its emergence a ...
to allow multiple users to access a single machine, and direct interaction with the machine using
computer terminals.
General Electric
General Electric Company (GE) is an American multinational conglomerate founded in 1892, and incorporated in New York state and headquartered in Boston. The company operated in sectors including healthcare, aviation, power, renewable energ ...
, who supplied the
GE-225
GE 210 advertisement from 1960
The GE-200 series was a family of small mainframe computers of the 1960s, built by General Electric (GE). GE marketing called the line ''Compatibles/200'' (GE-205/215/225/235). The GE-210 of 1960 is not compatible ...
computer it ran on, marketed a slight variation to commercial users and saw immediate uptake. A number of other companies soon introduced similar systems of their own, selling online time by the minute. By the end of the 1960s there was a version of BASIC for almost every
mainframe
A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications like bulk data processing for tasks such as censuses, industry and consumer statistics, enterprise ...
platform and
online service
An online service provider (OSP) can, for example, be an Internet service provider, an email provider, a news provider (press), an entertainment provider (music, movies), a search engine, an e-commerce site, an online banking site, a health site, ...
.
In 1966,
Hewlett-Packard
The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational information technology company headquartered in Palo Alto, California. HP developed and provided a wide variety of hardware components ...
(HP) introduced a new
minicomputer
A minicomputer, or colloquially mini, is a class of smaller general purpose computers that 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
HP 2100
The HP 2100 is a series of 16-bit minicomputers that were produced by Hewlett-Packard (HP) from the mid-1960s to early 1990s. Tens of thousands of machines in the series were sold over its twenty-five year lifetime, making HP the fourth largest mi ...
. Intended to be used in laboratories and factory settings, the company was surprised to find most were being sold for business processing. Looking to take advantage of this, in November 1968 they introduced the HP 2000, a system using two HP 2100 CPUs which implemented timesharing to support up to 32 users. The system worked in a fashion similar to the Dartmouth model, using one machine to control
input/output
In computing, input/output (I/O, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system. Inputs are the signals ...
and another to run the programs. In contrast to the Dartmouth versions which were
compiler
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
s,
HP Time-Shared BASIC
HP Time-Shared BASIC (HP TSB) 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 versio ...
was an
interpreter.
Interpreters quickly became common on smaller machines and minicomputers. Other vendors quickly copied the HP dialect, notably
Data General
Data General Corporation was one of the first minicomputer firms of the late 1960s. Three of the four founders were former employees of Digital Equipment Corporation (DEC).
Their first product, 1969's Data General Nova, was a 16-bit minicomputer ...
for their
Nova
A nova (plural novae or novas) is a transient astronomical event that causes the sudden appearance of a bright, apparently "new" star (hence the name "nova", which is Latin for "new") that slowly fades over weeks or months. Causes of the dramati ...
series which were very successful in the early 1970s.
Wang Laboratories
Wang Laboratories was a US computer company founded in 1951 by An Wang and G. Y. Chu. The company was successively headquartered in Cambridge, Massachusetts (1954–1963), Tewksbury, Massachusetts (1963–1976), and finally in Lowell, Massachusett ...
also had some success with their dedicated BASIC machines, the
Wang 2200
The Wang 2200 was an all-in-one minicomputer released by Wang Laboratories in May 1973. Unlike some other desktop computers, such as the HP 9830, it had a cathode-ray tube (CRT) in a cabinet that also included an integrated computer-controlled c ...
series. Each version had its own differences. One holdout was
Digital Equipment Corporation
Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president unt ...
(DEC), who had been involved with the
JOSS Joss may refer to:
* Joss (name), including a list of people with the name
* JOSS, a time-sharing programming language
* Joss (Chinese statue), a religious object
* Joss JP1, an Australian-built supercar
* Joss paper, a type of burnt offering
* J ...
program at the
Stanford Research Institute
SRI International (SRI) is an American nonprofit scientific research institute and organization headquartered in Menlo Park, California. The trustees of Stanford University established SRI in 1946 as a center of innovation to support economic d ...
(SRI) and introduced their
FOCAL language based on it. By the early 1970s the success of BASIC forced DEC to introduce a BASIC of their own with its own set of modifications.
Standards efforts
The divergence of BASIC led to interest in producing a standard to try to bring them back together. The first meetings on such a possibility took place in January 1974 under the newly-formed ANSI
working group
A working group, or working party, is a group of experts working together to achieve specified goals. The groups are domain-specific and focus on discussion or activity around a specific subject area. The term can sometimes refer to an interdis ...
X3J2. This led to a corresponding group being set up in September 1974 in Europe under the ECMA, TC 21. The two groups remained in close contact throughout the effort and released their respective standards at the same time. The first draft, was released by ANSI in January 1976. The final version was prepared in June 1977, and officially adopted by the ECMA on 14 December 1977.
Minimal BASIC was essentially the original 1964 Dartmouth BASIC written as a formal standard using an
Extended Backus–Naur form
In computer science, extended Backus–Naur form (EBNF) is a family of metasyntax notations, any of which can be used to express a context-free grammar. EBNF is used to make a formal description of a formal language such as a computer programmin ...
with an associated
test suite
In software development, a test suite, less commonly known as a validation suite, is a collection of test cases that are intended to be used to test a software program to show that it has some specified set of behaviors. A test suite often contai ...
to ensure implementation complied with the definition. It clarified formerly undefined concepts like whether
GO TO
and were the same thing, in this case stating that
goto statement = GO space* TO line number
, meaning ,
GO TO
and even
GO TO
were identical. Where differences between implementations existed, like in the handling of the statements or whether or not spaces were required between keywords and values, the standard always selected the Dartmouth pattern.
It was always understood that Minimal BASIC was not really useful on its own as it lacked many common features like
string manipulation
In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation). ...
. These more advanced features would be a focus of the follow-up effort,
Full BASIC
Full BASIC, sometimes known as Standard BASIC or ANSI BASIC, is an international standard defining a dialect of the BASIC programming language. It was developed by the American National Standards Institute (ANSI) X3.60 group in partnership with the ...
, which began serious work after the publication of Minimal. Full BASIC was not simply a version of Minimal with more features, instead, it was based on Dartmouth's Structured BASIC efforts and was designed to offer
structured programming
Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of the structured control flow constructs of selection ( if/then/else) and repetition ( ...
to support the construction of large programs. In contrast to Minimal, Standard BASIC was designed to significantly update BASIC.
Irrelevance
While the Minimal BASIC effort was taking place, the first widely available
microcomputer
A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (PC ...
was released, the
Altair 8800
The Altair 8800 is a microcomputer designed in 1974 by MITS and based on the Intel 8080 CPU. Interest grew quickly after it was featured on the cover of the January 1975 issue of Popular Electronics and was sold by mail order through advertiseme ...
. Shortly thereafter,
Altair BASIC was released by
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
. Within the year, dozens of new micros were released and as many new versions of BASIC. By the time the Minimal standard was ratified, there were already tens of thousands of machines running some variation of the language. Which dialect any particular interpreter followed was generally based on the machines used to develop it; MS BASIC was developed on a
PDP-10
Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, especi ...
and has many features from DEC's
BASIC-PLUS, while
Apple BASIC
An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple trees are cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, where its wild ancestor, ' ...
was written by
Steve Wozniak
Stephen Gary Wozniak (; born August 11, 1950), also known by his nickname "Woz", is an American electronics engineer, computer programmer, philanthropist, inventor, and technology entrepreneur. In 1976, with business partner Steve Jobs, he c ...
based on an HP manual and uses HP's system of string handling.
The first draft of the Minimal standard was released for comments in January 1976. Numerous comments were used to update the draft and its final release was prepared in June 1977 and formally ratified by the ECMA on 14 December 1977. The
US Bureau of Standards released the NBSIR 77-1420
test suite
In software development, a test suite, less commonly known as a validation suite, is a collection of test cases that are intended to be used to test a software program to show that it has some specified set of behaviors. A test suite often contai ...
to allow vendors to test compliance with the standard. As there were no microcomputer vendors in the standards groups, the system mostly found use on mainframe versions, which invariably had many extensions. One of the few microcomputer versions to implement the standard was Microsoft's BASIC-80 for the
Zilog Z80
The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The first working samples wer ...
, better known as
MBASIC
MBASIC is the Microsoft BASIC implementation of BASIC for the CP/M operating system. MBASIC is a descendant of the original Altair BASIC interpreters that were among Microsoft's first products. MBASIC was one of the two versions of BASIC bundled w ...
, which gained compliance with the standard in its 5.0 version.
After the release of Minimal, the standards groups turned their attention to Full BASIC, but this dragged on for years. The effort proceeded so slowly that the Dartmouth participants left and released their own version of the still-emerging standard as
True Basic
True BASIC is a variant of the BASIC programming language descended from Dartmouth BASIC—the original BASIC. Both were created by college professors John G. Kemeny and Thomas E. Kurtz.
History
True BASIC traces its history to an offsh ...
in 1984. This was bug-ridden and confusing, leading
Jerry Pournelle
Jerry Eugene Pournelle (; August 7, 1933 – September 8, 2017) was an American scientist in the area of operations research and human factors research, a science fiction writer, essayist, journalist, and one of the first bloggers. In the 1960s ...
to deride it as "madness" and
John Dvorak
John is a common English name and surname:
* John (given name)
* John (surname)
John may also refer to:
New Testament
Works
* Gospel of John, a title often shortened to John
* First Epistle of John, often shortened to 1 John
* Second ...
to dismiss it as "sad" and "doomed to failure." Plans to move Minimal BASIC to the
International Organization for Standardization
The International Organization for Standardization (ISO ) is an international standard development organization composed of representatives from the national standards organizations of member countries. Membership requirements are given in Ar ...
(ISO) were abandoned, and the ANSI group broke up leaving the original standards inactive.
Description
Minimal BASIC is closely based on early versions of Dartmouth BASIC and follows its conventions. The standard mostly clarifies certain limitations in an effort to produce a standard that can run on almost any machine. The following description assumes a basic familiarity with common BASICs, and highlights the differences in Minimal.
Program code
Like most BASIC implementations, Minimal is based on the underlying
source code
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
being edited using a
line editor
In computing, a line editor is a text editor in which each editing command applies to one or more complete lines of text designated by the user. Line editors predate screen-based text editors and originated in an era when a computer operator typic ...
and thus every line of code in Minimal has to have a
line number
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 increm ...
. The standard allows line numbers between 0 and 9999. In contrast to some interpreters, Minimal requires a space before every keyword, and a space or end-of-line after it.
Keywords include , , , ,, , , , , , , , , , and , , and .
Programs are required to have an as their last line. may have an optional prompt string, but that is up to the implementation, not part of the standard. did not allow a line number, an option seen in most interpreters of the era. loops are top tested, and will not execute their body if the test fails on the first iteration.
Variable names can consist of a single letter, or a letter and a single digit. Two-letter variable names are not allowed. Numbers are limited to the range 1E-38 to 1E38. String variables can have a maximum of 18 characters. Arrays can be one or two dimensional using , but only numeric arrays are supported. All variables are normally allocated space in an associated one-dimensional array without using , they are given space for 11 items, indexes 0 to 10. The lower bound for arrays is typically 0, but using can change the index to zero.
There are 11 defined functions; , , , , , , , , , and . Operators include , , , . Strings could only be compared for equals or not-equals, larger and smaller comparisons were not supported. Note that the logical operators, , and , are not supplied.
User-defined functions using were supported, but only for numerics. No built-in or user functions for strings were available.
Example
This code implements the
Sieve of Eratosthenes
In mathematics, the sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to any given limit.
It does so by iteratively marking as composite (i.e., not prime) the multiples of each prime, starting with the first prime n ...
:
1000 REM SIEVE OF ERATOSTHENES
1010 REM MODIFIED FROM QUICK BASIC MATH PROJECT DEMO
1020 REM
2010 REM L IS THE LIMIT OF THE SIEVE
2020 REM WE WILL FIND ALL PRIME NUMBERS UP TO L
2030 LET L = 1000
2040 REM N IS THE SIEVE ITSELF
2050 DIM N(1000)
2060 REM FILL THE SIEVE WITH ALL NUMBERS UP TO L
2070 FOR I = 1 TO L
2080 LET N(I) = I
2090 NEXT I
2100 REM START WITH THE FIRST PRIME NUMBER: 2
2110 LET P = 2
2120 PRINT P,
2130 REM "CROSS OUT" MULTIPLES OF P
2140 FOR I = P TO L STEP P
2150 LET N(I) = 0
2160 NEXT I
2170 REM FIND THE NEXT NUMBER NOT CROSSED OUT
2180 LET P = P + 1
2190 IF P = L THEN 2220
2200 IF N(P) <> 0 THEN 2120
2210 GOTO 2180
2220 PRINT
2230 END
Notes
References
Citations
Bibliography
*
*
*
*
*
*
*
*
*
* {{cite book
, title=ANSI X3.113-1987: Programming Languages - Full BASIC
, publisher=ANSI
, date=1987
, url=https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub68-2-Jan1987.pdf
, ref=CITEREFFull1987
Further reading
NBS Minimal BASIC Test Programs - Version 1 User's ManualBASIC-1, BASIC-2An Introduction to Programming with ECMA-55 Minimal BASIC
Currently Maintained Open Source Implementations
Jorge's bas55 ECMA-55 Minimal BASIC Interpreter
John's ECMA-55 Minimal BASIC Compiler
BASIC programming language
American National Standards Institute standards
Ecma standards