Beta BASIC

Last updated
Beta BASIC
Original author(s) Dr Andrew Wright
Developer(s) BetaSoft
Initial release1983;40 years ago (1983)
Final release
Beta Basic v4.0 / 1987;36 years ago (1987) [1]
Operating system ZX Spectrum
Type BASIC programming language interpreter
License Proprietary

Beta BASIC is a BASIC interpreter for the Sinclair Research ZX Spectrum microcomputer, written by Dr Andrew Wright [2] [3] in 1983 and sold by his one-man software house BetaSoft. [1] [4] [5] BetaSoft also produced a regular newsletter/magazine, BetaNews.

Contents

Originally it started as a BASIC toolkit but over time it grew into a full replacement.

Facilities

Beta BASIC completely replaced Sinclair BASIC, which as common for the time was also the OS providing a command line interface (CLI). Thus Beta BASIC provided a new and improved CLI and editor.

It supported Sinclair's idiosyncratic 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 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 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 in its own right, bypassing the Spectrum ROM, 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 with named procedures and functions, complete with local variables, allowing for programming using recursion. 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. 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 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 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 and typical hobbyist and professional CP/M 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 CPU. 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 was available for Beta BASIC code and existing Sinclair BASIC compilers such as HiSoft 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. 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

Special versions were produced for users of Interface 1 and the ZX Microdrive, and subsequently for those with the Opus Discovery, DISCiPLE and PlusD disk interfaces as well. A version for the Amstrad Spectrum +3 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é, 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 [6] 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. [7] [8]

Related Research Articles

<span class="mw-page-title-main">Amstrad CPC</span> Home computers produced by Amstrad

The Amstrad CPC is a series of 8-bit home computers produced by Amstrad between 1984 and 1990. It was designed to compete in the mid-1980s home computer market dominated by the Commodore 64 and the ZX Spectrum, where it successfully established itself primarily in the United Kingdom, France, Spain, and the German-speaking parts of Europe.

<span class="mw-page-title-main">Jupiter Ace</span> British home computer of the early 1980s

The Jupiter Ace by Jupiter Cantab was a British home computer of the early 1980s. The Ace differed from other microcomputers of the time in that its programming environment used Forth instead of the more popular BASIC.

The Sinclair QL is a personal computer launched by Sinclair Research in 1984, as an upper-end counterpart to the ZX Spectrum. The QL was aimed at the serious home user and professional and executive users markets from small to medium-sized businesses and higher educational establishments, but failed to achieve commercial success. While the ZX Spectrum has an 8-bit Zilog Z80 as the CPU, the QL uses a Motorola 68008. The 68008 is a member of the Motorola 68000 family with 32-bit internal data registers, but an 8-bit external data bus.

<span class="mw-page-title-main">ZX80</span> Popular and inexpensive home computer launched in 1980

The Sinclair ZX80 is a home computer launched on 29 January 1980 by Science of Cambridge Ltd.. It is notable for being one of the first computers available in the United Kingdom for less than a hundred pounds. It was available in kit form for £79.95, where purchasers had to assemble and solder it together, and as a ready-built version at £99.95.

<span class="mw-page-title-main">ZX Spectrum</span> 1982 series of home computers

The ZX Spectrum is an 8-bit home computer that was developed by Sinclair Research. It was released in the United Kingdom on 23 April 1982, and became Britain's best-selling microcomputer.

<span class="mw-page-title-main">ZX81</span> Inexpensive home computer by Sinclair Research, 1981

The ZX81 is a home computer that was produced by Sinclair Research and manufactured in Dundee, Scotland, by Timex Corporation. It was launched in the United Kingdom in March 1981 as the successor to Sinclair's ZX80 and designed to be a low-cost introduction to home computing for the general public. It was hugely successful; more than 1.5 million units were sold. In the United States it was initially sold as the ZX-81 under licence by Timex. Timex later produced its own versions of the ZX81: the Timex Sinclair 1000 and Timex Sinclair 1500. Unauthorized ZX81 clones were produced in several countries.

<span class="mw-page-title-main">Commodore 128</span> Home computer

The Commodore 128, also known as the C128, C-128, C= 128, is the last 8-bit home computer that was commercially released by Commodore Business Machines (CBM). Introduced in January 1985 at the CES in Las Vegas, it appeared three years after its predecessor, the Commodore 64, the bestselling computer of the 1980s.

<span class="mw-page-title-main">SAM Coupé</span> 8-bit British home computer released in late 1989

The SAM Coupé 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.

<span class="mw-page-title-main">Locomotive BASIC</span>

Locomotive Basic is a proprietary dialect of the BASIC programming language written by Locomotive Software on the Amstrad CPC and the later Locomotive BASIC-2 as a GEM application on the Amstrad PC1512 and 1640. It was the main descendant of Mallard BASIC, the interpreter for CP/M supplied with the Amstrad PCW.

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

<span class="mw-page-title-main">Timex Sinclair 1000</span> Home computer launched in 1982

The Timex Sinclair 1000 was the first computer produced by Timex Sinclair, a joint venture between Timex Corporation and Sinclair Research. It was launched in July 1982, with a US sales price of US$99.95, making it the cheapest home computer at the time; it was advertised as "the first computer under $100". The computer was aimed at regular home users. As purchased, the T/S 1000 was fully assembled and ready to be plugged into home televisions, which served as a video monitor. The T/S 1000 was a slightly modified version of the Sinclair ZX81 with an NTSC RF modulator, for use with North American TVs, instead of PAL for European TVs. The T/S 1000 doubled the onboard RAM from 1 KB to 2 KB; further expandable by 16 KB through the cartridge port. The T/S 1000's casing had slightly more internal shielding but remained the same as Sinclair's, including the membrane keyboard. Just like the ZX81, the T/S 1000 had black-and-white graphics and no sound.

<span class="mw-page-title-main">Timex Sinclair 2068</span> Home computer released in 1983

The Timex Sinclair 2068, released in November 1983, was Timex Sinclair's third and last home computer for the United States market. It was also marketed in Canada, Argentina, Portugal and Poland, as Timex Computer 2068.

The Didaktik was a series of 8-bit home computers based on the clones of Intel 8080 and Zilog Z80 processors produced by Didaktik in Skalica, in the former Czechoslovakia.

<span class="mw-page-title-main">Enterprise (computer)</span> Zilog Z80-based home computer

The Enterprise is a Zilog Z80-based home computer announced in 1983, but through a series of delays, not commercially available until 1985. The specification as released was powerful and one of the higher end in its class. This was due to the use of ASICs for graphics and sound which took workload away from the CPU, an extensive implementation of ANSI BASIC and a bank switching system to allow for larger amounts of RAM than the Z80 natively supported. It also featured a distinctive and colourful case design, and promise of multiple expansion options. Ultimately it was not commercially successful, after multiple renames, delays and a changing market place. Its manufacturer calling in the receivers in 1986 with significant debt. It was developed by British company Intelligent Software and marketed by Enterprise Computers. Its two variants are the Enterprise 64, with 64 kilobytes of Random Access Memory (RAM), and the Enterprise 128, with 128 KB of RAM.

<span class="mw-page-title-main">Hobbit (computer)</span> Soviet/Russian 8-bit home computer, based on the Sinclair ZX Spectrum hardware architecture

Hobbit is a Soviet/Russian 8-bit home computer, based on the ZX Spectrum hardware architecture. Besides Sinclair BASIC it also featured CP/M, Forth or LOGO modes, with the Forth or LOGO operating environment residing in an on-board ROM chip.

<span class="mw-page-title-main">TRS-80 Model 100</span> Portable computer introduced in 1983

The TRS-80 Model 100 is a portable computer introduced in April 1983. It is one of the first notebook-style computers, featuring a keyboard and liquid crystal display, in a battery-powered package roughly the size and shape of a notepad or large book.

<span class="mw-page-title-main">ZX Spectrum graphic modes</span> Graphic modes of the ZX Spectrum computer

The original ZX Spectrum computer outputs video through an RF modulator and was designed for use with contemporary 1980s television sets, for a simple colour graphic display.

<span class="mw-page-title-main">ZX Spectrum character set</span>

The ZX Spectrum character set is the variant of ASCII used in the ZX Spectrum family computers. It is based on ASCII-1967 but the characters ^, ` and DEL are replaced with ↑, £ and ©. It also differs in its use of the C0 control codes other than the common BS and CR, and it makes use of the 128 high-bit characters beyond the ASCII range. The ZX Spectrum's main set of printable characters and system font are also used by the Jupiter Ace computer.

<span class="mw-page-title-main">Oric</span> UK-manufactured 8-bit computer

Oric was the name used by UK-based Tangerine Computer Systems for a series of 6502-based home computers sold in the 1980s, primarily in Europe.

References

  1. 1 2 Beta Basic - World of Spectrum
  2. "Andrew Wright". Spectrum Computing - ZX Spectrum games, software and hardware. Retrieved 2022-11-30.
  3. "Andy Wright". World of SAM. Retrieved 2022-11-30.
  4. 1 2 3 4 5 6 7 "Beta Basic". Spectrum Computing - Sinclair ZX Spectrum games, software and hardware. Retrieved 2022-11-30.
  5. "BETASOFT". Spectrum Computing - ZX Spectrum games, software and hardware. Retrieved 2022-11-30.
  6. Croucher, Mel (1989). SAM Coupé Users' Manual (PDF). MILES GORDON TECHNOLOGY plc.
  7. Wright, Andy (1990). MasterBASIC for the SAM COUPÉ User Manual. Betasoft.
  8. "MasterBasic". Spectrum Computing - Sinclair ZX Spectrum games, software and hardware. Retrieved 2022-11-30.