bbc ====== BBC BASIC ====== {{tag>bbc}} == Keywords == **{{backlinks>.#keywords}}** The BBC BASIC is said by many to be the most advanced BASIC of the 8-bit era, and such a bold statement has plenty of arguments for it. Widespread availability was not one of them, though. This advanced BASIC was bundled with the BBC Micro, part of the government-funded //computer literacy program// of the United Kingdom in the early 1980s. Also part of the program were a number of high-quality books and //partworks// about "microcomputers" which were translated and published all around the world. They made the BBC Micro and its BASIC quite famous, but that was the closest most people could get to them: outside the UK, Acorn machines like the Beeb and some rare clones were not available. Richard T. Russell, a BBC employee, wrote a Z80 processor, CP/M port of the language, commercially released in 1983. It would not take BBC BASIC much far from the UK market for decades to come, but BBC BASIC was no longer confined to BBC/Acorn machines, and this would eventually become the longest-living, open, SDL-based multiplatform branch of BBC BASIC still [[https://bbcbasic.co.uk|alive]], [[https://www.bbcbasic.net|active]] and highly regarded by users as of January 2024. Widespread availability, finally. Additionally, the fifth version of BBC BASIC became open-sourced along with RISC OS V in 2018, and parallel open-source projects were born with the intent to implement BBC BASIC's syntax and capabilities, such as [[https://sourceforge.net/projects/brandy/|Brandy]]. This page mostly refers to the 6502-processor, 8-bit "classic" versions BASIC I to BASIC IV, which shipped with BBC and Acorn machines from late 1981 to 1993. Check the //Versions and successors// section below for RISC OS versions (BASIC V and beyond), ports and offsprings. ===== Where it is/was used ===== * BBC Micro Models A and B * BBC Master and Master Compact * Acorn Electron * Wren Executive * Tatung Einstein (UK/Taiwan/Taipei) * Cambridge Z88 * Amstrad CPC * RMNimbus * Victor Sirius (1988) **TO DO**: This section is still fairly incomplete and must be better organized to differentiate past and current versions. ===== Noteworthy characteristics ===== BBC BASIC was ahead of its time, and while somewhat based on [[atom|Acorn Atom BASIC]] it was a gigantic leap from its oddball predecessor. It was still a [[linenumbered|line-numbered BASIC]], but had features that for //years// would remain unheard of in the [[ms80basic|Microsoft side of BASIC]]. For example: * Named subroutines and functions with arguments and local variables * Multiline functions * [[:keywords:TRUE|TRUE]] and [[:keywords:FALSE]] value keywords * [[:keywords:REPEAT-UNTIL|REPEAT-UNTIL]] loop structures ===== Environment and usage ===== /* TO DO: notes about the REPL or IDE used, keyboard shortcuts and commands, command-line options for compiling and linking, environment variables which might be set... */ The screen editor of BBC BASIC had some advanced commands, such as [[:keywords:LISTO]], a version of [[:keywords:LIST]] enhanced with numeric options for things like automatic indentation of nested [[:keywords:FOR]]-[[:keywords:NEXT]] and REPEAT-UNTIL loops. ===== Extensions ===== /* TO DO: Famous libraries tools and extension packages made for this BASIC */ ===== Curiosities ===== /* TO DO: Historical notes, anecdotes, what people said about it */ ===== Related to... ===== /* * **[[basicTagName|basicTitle]]** - TO DO: a brief description of the relation they have with this one */ * **[[atom|Acorn Atom BASIC]]** ==== Influenced by ==== /* * **[[basicTagName|basicTitle]]** - TO DO: which are the noticeable or assumed influences */ ==== Influence for ==== /* * **[[basicTagName|basicTitle]]*** - TO DO: which are the noticeable or assumed influences */ ===== Versions and successors ===== /* No much need of prose here, just links. Notice the different patterns to create the links: * **[[basics:versionTagName|versionTitle]]** - for versions (created under this page) * **[[successorTagName|successorTitle]]** - for a successor (created as sibling of this page) */ * BASIC I - 1981, the original 6502-based BBC Micro A/B BASIC. * BASIC II - 1982, for BBC Micros and the Acorn Electron. Brought bugfixes and some changes. * New keywords: * [[:keywords:OSCLI]] * [[:keywords:OPENUP]] * Keywords with changed behaviours: * [[:keywords:ABS]] now could be used with a preceding minus operator (-) without causing a ''Type Mismatch'' error * [[:keywords:COUNT]] now would be reset to 0 if [[:keywords:MODE]] was changed and the screen was cleared * [[:keywords:ELSE]] now could be used along with [[:keywords:ON-GOSUB]] and [[:keywords:ON-GOTO]] in the scope of procedures and functions * [[:keywords:EVAL]] became able to evaluate [[:keywords:COUNT]], [[:keywords:ERL]], [[:keywords:ERR]], [[:keywords:HIMEM]], [[:keywords:LOMEM]], [[:keywords:PAGE]], [[:keywords:TIME]] and [[:keywords:TOP]] * [[:keywords:INPUT]] now accepted semicolons (;) as separators in its list of variables that could be written at once * [[:keywords:INSTR]] no more crashed if the "needle" string was longer than the "haystack" string * [[:keywords:ON ERROR]] passed to accept any line number * [[:keywords:OPENIN]] became used for opening a file in read-only mode; its previous functionality was assumed by the new keyword [[:keywords:OPENUP]]. * BASIC III - Had a version for the United States market with [[:keywords:COLOR]] instead of [[:keywords:COLOUR]]. * BASIC IV - For the 65SC12 processor of the BBC Master. Included keywords [[:keywords:EDIT]], [[:keywords:LIST_IF]], [[:keywords:time-s|TIME$]] and [[:keywords:ON_PROC]], along with a new usage of [[:keywords:EXT]]. * **[[.:bbc:bbc_v|BASIC V]]** - The first 32-bit, RISC OS version, open sourced in 2018. * [[https://www.bbcbasic.net/bbcsdl|BBC BASIC for SDL 2.0]] (last check 2024-01-04) - by Richard T. Russell, is a very active [[https://github.com/rtrussell/BBCSDL|open-source]] implementation based on BASIC IV with some language extensions, able to run under Microsoft Windows, GNU/Linux, Apple MacOS and iOS, Google Android, Raspberry Pi OS and WebAssembly. It will most certainly deserve a version page of its own pretty soon. * [[https://sourceforge.net/projects/brandy/|Brandy]] is an open interpreter of BBC BASIC V code, implemented in C. As of January 2024, the project didn't seem that active, having had its last update in November 2016. * [[https://sourceforge.net/projects/napoleonbrandy|Napoleon Brandy]] is a fork of Brandy with graphics support. * [[http://brandy.matrixnetwork.co.uk/|Matrix Brandy]] is a fork of Brandy with support for the BASIC VI version. As of January 2024, it seems to be the most active of the Brandy-based projects. Ready builds for Windows (32 and 64 bits), GNU/Linux (RHEL/Fedora YUM packages) and RISC OS are available for download. ===== References ===== /* If the ((citation)) syntax was used elsewhere, they will be listed below this section. You can prepend this with a list of books, magazines and web pages with information used in this page */ * https://www.bbcbasic.net , last check 2024-01-04 * https://www.bbcbasic.co.uk , last check 2024-01-04 * https://en.wikipedia.org/wiki/BBC_BASIC , last check 2024-01-04 * https://www.alphr.com/features/91575/bbc-basic-the-peoples-language , last check 2024-01-04 * https://en.wikipedia.org/wiki/BBC_Micro , last check 2024-01-04 * COLL, John. //BBC Microcomputer System User Guide//. British Broadcasting Corporation, 1984. Available at http://bbc.nvg.org/doc/BBCUserGuide-1.00.pdf , last check 2024-01-07. /* ===== Page tags ===== Follow the example below. Some tags might be useful for a to-be-implemented search mechanism. Separate tags with spaces, use quotes for a multiple-word tag {{tag>Compilers Microsoft Windows Linux}} */ {{tag>Interpreters Compilers 8-bit BBC Acorn RISC}}