Beta BASIC is a
BASIC interpreter
A BASIC interpreter is an Interpreter (computing), interpreter that enables users to enter and run programs in the BASIC programming language, language and was, for the first part of the microcomputer era, the default Application software, applica ...
for the
Sinclair Research
Sinclair Research Ltd is a British consumer electronics company founded by Clive Sinclair in Cambridge in the 1970s. In 1980, the company entered the home computer market with the ZX80 at £99.95, at that time the cheapest personal computer ...
ZX Spectrum
The ZX Spectrum () is an 8-bit computing, 8-bit home computer developed and marketed by Sinclair Research. One of the most influential computers ever made and one of the all-time bestselling British computers, over five million units were sold. ...
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 (P ...
, written by Dr Andrew Wright in 1983 and sold by his one-man software house BetaSoft.
BetaSoft also produced a regular newsletter/magazine, BetaNews.
Originally it started as a
BASIC toolkit but over time it grew into a full replacement.
Facilities
Beta BASIC completely replaced
Sinclair BASIC
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.
Designed to run in on ...
, which as common for the time was also the
OS providing a
command line interface
A command-line interface (CLI) is a means of interacting with software via commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternati ...
(CLI). Thus Beta BASIC provided a new and improved CLI and editor.
It supported Sinclair's
idiosyncratic
An idiosyncrasy is a unique feature of something. The term is often used to express peculiarity.
Etymology
The term "idiosyncrasy" originates from Greek ', "a peculiar temperament, habit of body" (from ', "one's own", ', "with" and ', "blend ...
single-key entry system for BASIC keywords but also allowed keywords to be spelled out letter-for-letter. This also removed the necessity for memorising the sometimes arcane key combinations necessary to enter less-commonly-used
BASIC
Basic or BASIC may refer to:
Science and technology
* BASIC, a computer programming language
* Basic (chemistry), having the properties of a base
* Basic access authentication, in HTTP
Entertainment
* Basic (film), ''Basic'' (film), a 2003 film
...
keywords. However, the single-key entry system was also extended by mapping the Spectrum's 'graphics' characters to Beta BASIC's new keywords. To switch from keyword entry to typed entry, it was merely necessary to type a single space, causing the cursor mode to change from K (keyword) to L (lowercase) or C (capital). (The
KEYWORDS
statement could also be used to alter this behaviour, for example by disabling the K mode.)
The editor, when listing, could optionally automatically
prettyprint
Pretty-printing (or prettyprinting) is the application of any of various stylistic formatting conventions to text files, such as source code, markup, and similar kinds of content. These formatting conventions may entail adhering to an indentati ...
code. It was possible to do this manually in Sinclair BASIC, but automatic indentation has the advantage of highlighting certain types of coding error - primarily those to do with failing to correctly close constructs. Other editing improvements included automatic highlighting of the current-line indicator - a small tweak but disproportionately helpful - and the ability to move the cursor up and down as well as left and right, a huge boon when editing long lines. Combined with the 64-column display (see "New functionality" section below), these improvements made Beta BASIC a much more productive environment even for coding standard Sinclair BASIC and making no use of BetaSoft's language additions.
Beta BASIC was also a standalone
interpreter
Interpreting is translation from a spoken or signed language into another language, usually in real time to facilitate live communication. It is distinguished from the translation of a written text, which can be more deliberative and make use o ...
in its own right, bypassing the Spectrum
ROM
Rom, or ROM may refer to:
Biomechanics and medicine
* Risk of mortality, a medical classification to estimate the likelihood of death for a patient
* Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac
* ...
, which it used as a library. It occasionally made calls into the ROM to access functions that were not worth re-implementing either because the ROM routines were good enough or for reasons of space - Beta BASIC had to run in the 48
KB of memory available on a Spectrum and still leave room for the user's code.
Language changes
For its time, Beta BASIC was sophisticated. It provided full
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making specific disciplined use of the structured control flow constructs of selection ( if/then/else) and repet ...
with named procedures and
functions, complete with
local variables
Local may refer to:
Geography and transportation
* Local (train), a train serving local traffic demand
* Local, Missouri, a community in the United States
Arts, entertainment, and media
* ''Local'' (comics), a limited series comic book by Bria ...
, allowing for programming using
recursion
Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
. Although it supported line numbers, they were not necessary and it offered a mode of operation which completely suppressed the display of line numbers.
On the 128K Spectrum machines, Beta BASIC provided extended facilities allowing programmers to access the machine's extra memory, which took the form of a
RAM disk
A RAM drive (also called a RAM disk) is a block of random-access memory ( primary storage or volatile memory) that a computer's software is treating as if the memory were a disk drive (secondary storage). RAM drives provide high-performance te ...
. As well as allowing the programmer to save and load programs, blocks of memory or screen images into the RAM disc and catalogue the contents of the RAM disk, Beta BASIC also provided commands for the creation and use of
arrays
An array is a systematic arrangement of similar objects, usually in rows and columns.
Things called an array include:
{{TOC right
Music
* In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
held in the RAM disk, allowing programs running in the 30 KB or so of free memory on the Spectrum to manipulate arrays approaching 80 KB - a significant extra amount of space by 1980s standards and more than almost any other 8-bit BASIC, which were generally limited to 64 KB of program and data combined.
New functionality
Beta BASIC also drove the Spectrum's 256x192
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
display directly, eliminating the restrictions of the ROM's 32-column text display. Beta BASIC offered
scalable screen fonts, with a special soft font which was only 4 pixels wide but still legible. This meant that Beta BASIC could display 64 columns of text across the screen, making it more comparable to traditional 80-column displays of
computer terminals
A computer terminal is an electronic or electromechanical computer hardware, hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. Most early computers only had a front panel to ...
and typical hobbyist and professional
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
machines. (A few home computers of the 80s could also display 80 columns.) If the user was prepared to tolerate characters being displayed without gaps between them, an 85 column display was possible. This was not very readable but did allow easy porting of BASIC applications designed for an 80-column screen. Text size could be controlled programmatically so that part of a program's display might use 64-column text, part 32-column text and enlarged or reduced intermediate sizes.
Limitations
Beta BASIC suffered from some limitations. As with other 8-bit microprocessors, the Spectrum could only address 64 KB of contiguous memory due to the addressing restrictions of the Spectrum's
Zilog Z80
The Zilog Z80 is an 8-bit computing, 8-bit microprocessor designed by Zilog that played an important role in the evolution of early personal computing. Launched in 1976, it was designed to be Backward compatibility, software-compatible with the ...
CPU
A central processing unit (CPU), also called a central processor, main processor, or just processor, is the primary processor in a given computer. Its electronic circuitry executes instructions of a computer program, such as arithmetic, log ...
. Of this, 16 KB was taken by the Sinclair BASIC ROM, leaving 48 KB for RAM. The screen took some of this, as did the areas used for holding the interpreter's own internal data structures. Beta BASIC took around 11-12 KB of the remainder, in some cases leaving only 20 KB or so for user programs.
The replacement of Sinclair's editor meant that it was not possible to use the 128K Spectrum ROM's full-screen BASIC editor. No
compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
was available for Beta BASIC code and existing Sinclair BASIC compilers such as
HiSoft
HiSoft Technology International Limited was a multinational information technology and business process outsourcing company headquartered in Dalian, China.
Founded in 1996, HiSoft was listed on the NASDAQ public exchange in 2010.
In November 2 ...
BASIC could not handle the extended keywords and facilities of Beta BASIC.
Another remaining Sinclair BASIC limitation was that only single-letter variable names could be used for strings, arrays and other types.
The only other 8-bit BASIC with inbuilt support for structured programming was
BBC BASIC
BBC BASIC is an interpreted version of the BASIC programming language. It was developed by Acorn Computers Ltd when they were selected by the BBC to supply the computer for their BBC Literacy Project in 1981.
It was originally supplied on ...
. Beta BASIC named procedures did not need to be called with the PROC keyword like in BBC BASIC and thus became new language keywords, allowing the language to be extended in itself. However, BBC BASIC was considerably quicker - the fastest BASIC interpreter of the time. Beta BASIC was not especially fast, though it included faster replacements for particularly slow ROM routines, such as the circle and arc drawing code.
Versions
*BetaBasic V1.0 - 1983
*BetaBasic V1.8 - 1984
*BetaBasic V1.9 - 1984
*BetaBasic V3.0 - 1985
*BetaBasic V3.1 - 1985
*BetaBasic V4.0 - 1987
Special versions were produced for users of
Interface 1
The ZX Interface 1, launched in 1983, was a peripheral from Sinclair Research for its ZX Spectrum home computer. Originally intended as a local area network interface for use in school classrooms, it was revised before launch to also act as th ...
and the
ZX Microdrive
ZX Microdrive unit
The ZX Microdrive is a magnetic-tape data storage system launched in July 1983 by Sinclair Research for its ZX Spectrum home computer. It was proposed as a faster-loading alternative to the cassette and cheaper than a flop ...
, and subsequently for those with the
Opus Discovery,
DISCiPLE
A disciple is a follower and student of a mentor, teacher, or other figure. It can refer to:
Religion
* Disciple (Christianity), a student of Jesus Christ
* Twelve Apostles of Jesus, sometimes called the Twelve Disciples
* Seventy disciples in t ...
and
PlusD disk interfaces as well. A version for the
Amstrad
Amstrad plc was a British consumer electronics company, founded in 1968 by Alan Sugar. During the 1980s, the company was known for its Home computer, home computers beginning with the Amstrad CPC and later also the ZX Spectrum range after the ...
Spectrum +3
A spectrum (: spectra or spectrums) is a set of related ideas, objects, or properties whose features overlap such that they blend to form a continuum. The word ''spectrum'' was first used scientifically in optics to describe the rainbow of col ...
was also under consideration for a while, but Wright discarded the project.
Subsequent development
During the development of their sophisticated new successor to the Spectrum, the
SAM Coupé
The SAM Coupé (pronounced /sæm ku:peɪ/ from its original British English branding) is an 8-bit British home computer manufactured by '' Miles Gordon Technology'' (''MGT''), based in Swansea in the United Kingdom and released in December 1989.
...
, Alan Miles and Bruce Gordon of
Miles Gordon Technology approached BetaSoft and contracted Wright to provide the BASIC for the new machine. He provided a complete BASIC interpreter which drew extensively upon Beta BASIC but was differently structured, as this was a language in its own right and had no Sinclair ROM to call upon or work around.
SAM BASIC was largely compatible with Beta BASIC and operated in a very similar manner, except for areas where the SAM hardware was significantly different, such as the SAM's screen and extended memory. BetaSoft later released an extension to SAM BASIC, named MasterBASIC.
References
{{BASIC
BASIC extensions
ZX Spectrum software
BASIC interpreters
BASIC programming language family