BBC Micro The full version list is available here: 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 Model 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 United States 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 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. BASIC IV (1986) was a further improvement to BASIC IV, and was included on the Master Compact machine. The version of BASIC on the Compact included re-coded mathematical routines, said to provide a 30% speed increase over the version included in the rest of the Master series. HI-BASIC 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) on the second processor, rather than the usual &8000 address on the BBC B. This allowed more program space to be available on either the external or internal 6502 second processors. A version was introduced to support a
Zilog Z80 second processor. 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. The interpreter can deal with both BASIC and 6502 assembly language, which can be included between the [ and ] characters. This contributed to the system's popularity with industrial and research engineers.
Further details/determining BASIC version As the BBC MOS and RISC OS were usually supplied on ROM, it may be assumed that a specific release of the operating system contained a specific version of BASIC. As such, there is no simple way to determine
which version of BASIC is actually running other than by enquiring the operating system identity and thus making an assumption. {{quote frame|2=BASIC ROM USER GUIDE See also BeebWiki entry for INKEY. On the BBC family, it is possible to run both the standard BASIC
and an enhanced HIBASIC on the 6502 second processor. One may determine if the program is running on the second processor by examining the initial value of PAGE, it will be &800 if using the second processor. To distinguish between BASIC and HIBASIC, one should examine the initial value of HIMEM. This will be &8000 for BASIC running on the second processor, and &B800 for HIBASIC on the second processor. A similar situation exists on
RISC OS where there may be the normal BASIC or BASIC64 (which offers higher precision maths). Normal BASIC identifies itself as "BASIC V" and BASIC64 identifies itself as "BASIC VI", therefore the following (used before any error has occurred) will distinguish one from the other: IF INSTR(REPORT$,"VI") THEN PRINT "BASIC64" ELSE PRINT "BASIC" There are better ways of doing this. See the BeebWiki. In almost all cases you shouldn't need to be testing for what BASIC or platform your program is running on, just make the call and read whatever returned data are returned and deal with it.
Acorn Archimedes (RISC OS) With the move to the 32-bit
ARM CPU and the removal of the 16 KB limit on the BASIC code size many new features were added. BASIC V version 1.04 was 61 KB long. Current versions of RISC OS still contain a BBC BASIC V interpreter. The source code to the
RISC OS 5 version of BBC BASIC V has been released under the Apache 2.0 license by
RISC OS Open. 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 that takes fourteen numeric parameters and effectively does nothing— as in older versions, it calls OS_Word 8, but that does nothing on RISC OS. The in-line 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
IEEE 754 8-byte format real numbers, 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
RiscPC. A version of BBC BASIC V was also available to run on the
ARM second processor for the BBC Micro. A compiler for BBC BASIC V was produced by Paul Fellows, team leader of the Arthur OS development, called the Archimedes BASIC Compiler and published initially by DABS Press. ABC was able to implement almost all of the language, with the obvious exception of the EVAL function, which inevitably required run-time programmatic interpretation. As evidence of its completeness, it was able to support inline assembler syntax. The compiler was written in BBC BASIC V. Many applications initially written to run under the interpreter benefitted from the performance boost that this gave, putting BBC BASIC V on a par with other languages for serious application development.
Other platforms BBC BASIC has also been ported to many other platforms. A
NS32016 version of BBC BASIC was supplied with the Acorn 32016 coprocessor and Acorn ABC. In addition to the version of BBC BASIC supplied with the
BBC Micro's Zilog Z80 second processor, a Z80-based version of BBC BASIC also exists for
CP/M-based systems. 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. This version has been implemented on the
TI-83 Plus and
TI-84 Plus series
graphing calculators. Due to efforts of J. G. Harston (also responsible for a
PDP-11 version updated as of 2025; implementing BBC BASICV IV and a few additions from BBC BASIC V extensions) a version of BBC BASIC for the
ZX Spectrum was released in January 2002, with many improvements made in subsequent releases. BBC BASIC was also implemented for
MS-DOS as
BBCBASIC (86), which aimed for maximum compatibility with the BBC Micro, and
BBasic with its own enhancements based on BASIC II. A version of BBC BASIC integrated with the
Windows graphical user interface, BBC BASIC for Windows created by
Richard Russell, developer of the Z80 and
x86 versions, was released in 2001. 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, and an external
library has recently added support for objects. BBC BASIC for
SDL was also developed by Richard T. Russell, and is largely compatible with the previous BBC BASIC for Windows, sharing with that dialect many new and advanced features including data structures, PRIVATE variables, an EXIT statement, long strings, event interrupts, an address-of operator, byte variables, a line continuation character, indirect procedure and function calls and improved numeric accuracy. The first version was released in February 2019, and remains in active development . BBC BASIC for SDL 2.0 supports Windows, MacOS, Linux, Raspberry Pi OS, Android, iOS and mobile devices supporting the SDL library, A fork of this,
Matrix Brandy, remains under active development. An emulator of the BBC Micro for the
Amiga was produced by Ariadne Software for
CBM (UK). While extremely fast, it did not emulate the 6502 at full speed, so assembly code would run slower than a real BBC while BASIC programs would run much faster. Due to the way the optimised BASIC and the 6502 emulation interacted, almost no commercial games would run but well-behaved code and educational software generally worked. Additionally, 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 ageing BBC Bs with Amiga 500s. A version of BBC BASIC V (Z80) has also been made for the TI-83/84+
Texas Instruments calculator families by Benjamin Ryves. A
Commodore 64 version
Shado was produced by a small software house Aztec Software in the early 1980s. Patched versions of Acorn's 6502 based HI-BASIC have also been experimentally run on C64, with an interface to the C64 Kernel, replacing the Acorn MOS calls otherwise made. There have also been efforts to make 6502 based version of BBC BASIC available on the
Apple II. Applecorn being one such effort. BBC BASIC is the programming language used in the Agon Light, an
open-sourced 8-bit
Z80-based
single-board computer and
microcontroller designed by Bernardo Kastrup and released in 2022. ==Sample code==