BBC BASIC

BBC BASIC

BBC BASIC was developed in 1981 as a native programming language for the MOS Technology 6502 based Acorn BBC Micro home/personal computer, mainly by Roger Wilson. It was a version of the BASIC programming language adapted for a U.K. computer literacy project of the BBC.

BBC BASIC, based on the older Atom BASIC (for the Acorn Atom), extended traditional BASIC with named procedures and functions, REPEAT-UNTIL loops, and IF-THEN-ELSE structures inspired by COMAL. The interpreter also included powerful statements for controlling the BBC Micro's four-channel sound output and its high-resolution graphics display.

One of the unique features of BBC BASIC was the presence of an inline assembler allowing users to write 6502 assembly language programs. The assembler was fully integrated into the BASIC interpreter and shared variables with it. This allowed developers to write not just assembly language code, but also BASIC code to emit assembly language, making it possible to use code generation techniques and even write simple compilers in BASIC.

BBC Micro versions

BASIC I, the original version, was shipped on early BBC Micros

BASIC II was used on the Acorn Electron and BBC Micros shipped after 1982, including the BBC B+. It added the OPENUP and OSCLI keywords, along with offset assembly and bug fixes.

BASIC III, was produced in both a UK version and a US market version for Acorn's abortive attempt to enter the cross-Atlantic computer market. Apart from a few bug fixes, the only change from BASIC II was that the COLOUR command could also be spelled COLOR: regardless of which was input, the UK version always listed it as COLOUR, the US version as COLOR. The main place that BASIC III can be found is as the HI-BASIC version for the external second processor.

BASIC IV, also known as CMOS BASIC, available on the BBC Master and Master Compact machines, was changed to use the new instructions available in the 65SC12 processor, reducing the size of the code and therefore allowing the inclusion of LIST IF, EXT# as a statement, EDIT, TIME$, ON PROC, | in VDU statements and faster floating point. Bug fixes were again included.

HI-BASIC: this was available in two versions, the first based on BASIC III, and the second based on BASIC IV. Both were built to run from a higher address (B800) to allow more program space to be available on either the external or internal 6502 Second Processors.

Another version of BBC BASIC, called BAS128, was supplied on tape and disc with the BBC Master and Master Compact; it loaded into main RAM and used the 64 kB of Sideways RAM for user programs. This provided support for much larger programs at the cost of being a lot slower than the normal ROM-based version.

Acorn Archimedes (RISC OS) versions

With the move to the 32 bit ARM CPU and the removal of the 16kB limit on the BASIC code size many new features were added. BASIC V version 1.04 was 61kB long.

Amongst the new commands and features supported were:
* WHILE-ENDWHILE
* IF-THEN-ELSE-ENDIF
* CASE-OF-WHEN-OTHERWISE-ENDCASE,
* RETURN parameters in procedures,
* local arrays,
* procedure libraries (LIBRARY,INSTALL and OVERLAY),
* LOCAL DATA and LOCAL ERROR handlers,
* a relative RESTORE,
* array operations,
* new operators,
* STEP TRACE,
* Commands for the new sound system, mouse, graphics.

The graphics commands were entirely backwards compatible, the sound less so (for example, the ENVELOPE keyword from BASIC V onwards is a command which takes fourteen numeric parameters and effectively does nothing - as in older versions, it calls OS_Word 8, but that does nothing on RISC OS [http://lists.cloud9.co.uk/pipermail/bbc-micro/2006-November/000257.html] ). The in-line in 6502 assembler was replaced by an ARM assembler. BASIC V was said, by Acorn, to be "certainly the fastest interpreted BASIC in the world" and "probably the most powerful BASIC found on any computer".

BASIC VI is a version of BASIC V that supports 8 byte format real numbers (according to IEEE standard 754) as opposed to the standard 5 byte format introduced in BASIC I.

BBC BASIC V and VI were delivered as standard on the Acorn Archimedes and the Risc PC.

Current versions of RISC OS still contain a BBC BASIC interpreter.

The source code to the RISC OS 5 version of BBC BASIC V was recently released as 'shared source' by Risc OS Open.

BBC BASIC on other platforms

BBC BASIC has also been ported to many other platforms [http://mdfs.net/Software/BBCBasic/] .

In addition to the version of BBC BASIC supplied with the BBC Micro's Z80 Second processor, a Z80 based version of BBC BASIC also exists for CP/M based systems. Until recently no version existed for the Sinclar Spectrum, however due to efforts of J.G Harston (also responsible for a PDP-11 version), [http://mdfs.net/Software/BBCBasic/Spectrum/ BBC BASIC for the spectrum] was released in January 2002 with many improvements made in subsequent releases.

A Zilog Z80-version of BBC BASIC was also used on the Tiki 100 desktop computer,
Cambridge Z88 portable and the Amstrad NC100 Notepad and Amstrad NC200 Notebook computers.

For PC based systems, BBC BASIC was also implemented for DOS as "BBCBASIC (86)" (which aimed for maximum compatibility with the BBC Micro) and "BBasic" (which concentrated on the BASIC language itself, with its own enhancements based on BASIC II).

A version of BBC BASIC integrated with the Microsoft Windows graphical user interface, [http://www.rtrussell.co.uk/products/bbcwin/bbcwin.html BBC BASIC for Windows] created by Richard Russell (who also developed the Z80 and x86 versions), was released in 2001.

This version is still under active development, seeing much industry use currently.Whilst supporting nearly completely the original BBC BASIC specification (BASIC IV), the Windows version supports much of BASIC V/VI syntax as well as some advanced features of its own. Features unique to BBC BASIC for Windows include interpreter support for record/structure types, and the ability to call Windows API routines or those in an external DLL. Recent versions have included advanced features comparable with languages like C.

A GPL clone of BBC BASIC named [http://jaguar.orpheusweb.co.uk/branpage.html Brandy] written in portable C is also available.

A near-emulator of the BBC Micro for the Commodore Amiga was produced by Ariadne Software for CBM (UK). While extremely fast, it did not emulate the 6502, and it used a slightly less precise floating-point numeric format. For a while it was bundled with a special academic package of the Amiga 500, in the hope that schools would replace their aging BBC Bs with Amiga 500s.

External links

* http://www.bbcbasic.org/
* http://www.rtrussell.co.uk/
* http://mdfs.net/Software/BBCBasic/
* [http://www.ncus.org.uk/ The Amstrad NC Users' Site]
* [http://www.pawbooks.co.uk Ebook programming guide with interfacing methods]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • BBC BASIC — Saltar a navegación, búsqueda BBC BASIC Apareció en: 1981 Última versión: 5.80 Influido por: BASIC, Atom BASIC Sistema operativo: BBC Micro MOS Technology 6502 Risc OS Sinclair ZX Spectrum …   Wikipedia Español

  • BBC BASIC — Класс языка: процедурный, объектно ориентированный, компонентно ориентированный Тип исполнения: компилируемый, интерпретируемый Появился в: 1981 Релиз: 5.90b …   Википедия

  • BBC BASIC — ist eine Programmiersprache, die 1981 als eine native Programmiersprache für den MOS Technology 6502 basierten Acorn BBC Micro Heimcomputer, hauptsächlich von Sophie Wilson entwickelt wurde. Es ist eine Version der BASIC Programmiersprache,… …   Deutsch Wikipedia

  • Basic (langage) — BASIC Pour les articles homonymes, voir Basic. {{{image}}}   Sigles d une seule lettre   Sigles de deux lettres   Sigles de trois lettres …   Wikipédia en Français

  • BBC Micro — Der BBC Micro (Acorn BBC Microcomputer) ist ein auf dem 6502 Prozessor (2 MHz) basierender Heimcomputer der britischen Firma Acorn. Seine Verbreitung fand er ab 1981 vor allem in britischen Schulen, weil eine Sendung des BBC den Acorn als… …   Deutsch Wikipedia

  • BASIC — Класс языка: алгоритмическое, процедурное, объектное программирование Появился в: 1963 г. Расширение файлов: .bas Типизация данных: нестрогая Бейсик (от BASIC, сокращение от англ.  …   Википедия

  • BASIC-256 — с …   Википедия

  • BBC Micro — Infobox computer Name = BBC Model A to Model B+128 Photo = Caption = The original BBC Micro Type = 8 bit microcomputer Developer = Acorn Computers Released = Late 1981 Discontinued = 1986 Processor = MOS Technology 6502/6512 at 2 MHz Memory = 16… …   Wikipedia

  • BASIC — This article is about the programming language. For the think tank, see British American Security Information Council. For the group of countries, see BASIC countries. For other uses, see Basic (disambiguation). BASIC Screenshot of Atari BASIC,… …   Wikipedia

  • BBC Micro — Computador BBC Micro. El BBC Micro, conocido cariñosamente como el Beeb, fue uno de los primeros ordenadores domésticos. Fue diseñado y construido por Acorn Computers para la British Broadcasting Corporation (BBC). A principios de los años 1980,… …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”