HOME

TheInfoList



OR:

BBC BASIC is a version of the BASIC programming language released in 1981 as the native programming language for the
BBC Micro The British Broadcasting Corporation Microcomputer System, or BBC Micro, is a series of microcomputers and associated peripherals designed and built by Acorn Computers in the 1980s for the BBC Computer Literacy Project. Designed with an emphas ...
home/personal computer, providing a standardized language for a UK computer literacy project of the
BBC #REDIRECT BBC #REDIRECT BBC Here i going to introduce about the best teacher of my life b BALAJI sir. He is the precious gift that I got befor 2yrs . How has helped and thought all the concept and made my success in the 10th board exam. ...
...
. It was written mainly by
Sophie Wilson Sophie Mary Wilson (born Roger Wilson; June 1957) is an English computer scientist, who helped design the BBC Micro and ARM architecture. Wilson first designed a microcomputer during a break from studies at Selwyn College, Cambridge. She ...
. BBC BASIC, based on the older Atom BASIC for the
Acorn Atom The Acorn Atom is a home computer made by Acorn Computers Ltd from 1980 to 1982, when it was replaced by the BBC Micro. The Micro began life as an upgrade to the Atom, originally known as the Proton. The Atom was a progression of the MOS Techn ...
, extended contemporary microcomputer BASICs with named DEF PROC/DEF FN procedures and functions, REPEAT UNTIL loops, and IF THEN ELSE structures inspired by
COMAL COMAL (''Common Algorithmic Language'') is a computer programming language developed in Denmark by Børge R. Christensen and Benedict Løfstedt and originally released in 1975. COMAL was one of the few structured programming languages that was a ...
. The interpreter also included statements for controlling the BBC Micro's four-channel sound output and its low-/high-resolution eight-mode graphics display. Due to a number of optimizations, BBC BASIC ran programs much faster than
Microsoft BASIC Microsoft BASIC is the foundation software product of the Microsoft company and evolved into a line of BASIC interpreters and compiler(s) adapted for many different microcomputers. It first appeared in 1975 as Altair BASIC, which was the first ...
running on similar machines. The optimizations included using multiple linked lists for variable lookup rather than a single long list, pre-defining the location of integer variables, and having separate integer maths routines. Speed was further improved on the BBC machine by its fast
RAM Ram, ram, or RAM may refer to: Animals * A male sheep * Ram cichlid, a freshwater tropical fish People * Ram (given name) * Ram (surname) * Ram (director) (Ramsubramaniam), an Indian Tamil film director * RAM (musician) (born 1974), Dutch * ...
chips, which allowed the
MOS Technology 6502 The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small te ...
processor and Motorola 6845 display driver to share memory without either pausing for access. As a result of these design features, BBC BASIC ran David Ahl's
Creative Computing Benchmark The Creative Computing Benchmark, also called Ahl's Simple Benchmark, is a computer benchmark that was used to compare the performance of the BASIC programming language on various machines. It was first introduced in the November 1983 issue of '' ...
in 21 seconds, besting even the
IBM Personal Computer The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a team ...
, and far outpacing most other 8-bit platforms. The only commercial 8-bit BASIC computers that were as fast as the BBC Micro were the Swedish
ABC 80 The ABC 80 (Advanced BASIC Computer 80) was a personal computer engineered by the Swedish corporation Dataindustrier AB (DIAB) and manufactured by Luxor in Motala, Sweden in the late 1970s and early 1980s. It was introduced on the market in August ...
and
ABC 800 ABC are the first three letters of the Latin script known as the alphabet. ABC or abc may also refer to: Arts, entertainment, and media Broadcasting * American Broadcasting Company, a commercial U.S. TV broadcaster ** Disney–ABC Televisio ...
. The improved BASIC 4 on the
BBC Master The BBC Master is a home computer released by Acorn Computers in early 1986. It was designed and built for the British Broadcasting Corporation (BBC) and was the successor to the BBC Micro Model B. The Master 128 remained in production until 199 ...
executes the same benchmark in about seven seconds. One of the unique features of BBC BASIC was the
inline assembler In computer programming, an inline assembler is a feature of some compilers that allows low-level code written in assembly language to be embedded within a program, among code that otherwise has been compiled from a higher-level language such as C ...
, allowing users to write assembly language programs for the
6502 The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small te ...
and, later, the
Zilog Z80 The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The first working samples were ...
,
NS32016 The NS32000, sometimes known as the 32k, is a series of microprocessors produced by National Semiconductor. The first member of the family came to market in 1982, briefly known as the 16032 before becoming the 32016. It was the first 32-bit general ...
and
ARM In human anatomy, the arm refers to the upper limb in common usage, although academically the term specifically means the upper arm between the glenohumeral joint (shoulder joint) and the elbow joint. The distal part of the upper limb between th ...
. The assembler was fully integrated into the
BASIC interpreter A BASIC interpreter is an interpreter that enables users to enter and run programs in the BASIC language and was, for the first part of the microcomputer era, the default application that computers would launch. Users were expected to use the BAS ...
and shared variables with it, which could be included between the
and or AND may refer to: Logic, grammar, and computing * Conjunction (grammar), connecting two words, phrases, or clauses * Logical conjunction in mathematical logic, notated as "∧", "⋅", "&", or simple juxtaposition * Bitwise AND, a boole ...
characters, saved via *SAVE and *LOAD, and called via the CALL or USR commands. 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.


History

In 1978
Hermann Hauser Hermann Maria Hauser, KBE, FRS, FREng, FInstP, CPhys (born 1948) is an Austrian-born entrepreneur, venture capitalist and inventor who is primarily associated with the Cambridge technology community in England. Education and early life W ...
and Chris Curry founded
Acorn Computers Acorn Computers Ltd. was a British computer company established in Cambridge, England, in 1978. The company produced a number of computers which were especially popular in the UK, including the Acorn Electron and the Acorn Archimedes. Acorn's ...
. Much of the code was developed at Cambridge University by
Sophie Wilson Sophie Mary Wilson (born Roger Wilson; June 1957) is an English computer scientist, who helped design the BBC Micro and ARM architecture. Wilson first designed a microcomputer during a break from studies at Selwyn College, Cambridge. She ...
and her colleagues. Starting with the original Acorn dialect of BASIC - "12K of working language which could be 'bent at will'" that had been informed by Algol W and BCPL in its design - Wilson "set about bending it towards Pascal" in collaboration with John Coll, creating a language combining "Microsoft necessities" and "Pascal-ish variations". Some Pascal-influenced features such as labels and multi-line conditional statements had to be dropped, however, due to broad compatibility expectations with Microsoft BASIC, ostensibly imposed by the requirements of the BBC.


Platforms and versions


BBC Micro

The full version list is available here: BASIC I, the original version, was shipped on early
BBC Micro The British Broadcasting Corporation Microcomputer System, or BBC Micro, is a series of microcomputers and associated peripherals designed and built by Acorn Computers in the 1980s for the BBC Computer Literacy Project. Designed with an emphas ...
s. BASIC II was used on the
Acorn Electron The Acorn Electron (nicknamed the Elk inside Acorn and beyond) was a lower-cost alternative to the BBC Micro educational/ home computer, also developed by Acorn Computers Ltd, to provide many of the features of that more expensive machine at a ...
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 The BBC Master is a home computer released by Acorn Computers in early 1986. It was designed and built for the British Broadcasting Corporation (BBC) and was the successor to the BBC Micro Model B. The Master 128 remained in production until 199 ...
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: 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) 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 second Zilog Z80 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 or AND may refer to: Logic, grammar, and computing * Conjunction (grammar), connecting two words, phrases, or clauses * Logical conjunction in mathematical logic, notated as "∧", "⋅", "&", or simple juxtaposition * Bitwise AND, a boole ...
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. See als
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 RISC OS is a computer operating system originally designed by Acorn Computers Ltd in Cambridge, England. First released in 1987, it was designed to run on the ARM chipset, which Acorn had designed concurrently for use in its new line of Archi ...
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 th
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 is returned and deal with it.


Acorn Archimedes (RISC OS)

With the move to the 32-bit
ARM In human anatomy, the arm refers to the upper limb in common usage, although academically the term specifically means the upper arm between the glenohumeral joint (shoulder joint) and the elbow joint. The distal part of the upper limb between th ...
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 RISC OS is a computer operating system originally designed by Acorn Computers Ltd in Cambridge, England. First released in 1987, it was designed to run on the ARM chipset, which Acorn had designed concurrently for use in its new line of Archi ...
5 version of BBC BASIC V has been released under the Apache 2.0 license by
RISC OS Open RISC OS Open Ltd. (also referred to as ROOL) is a limited company engaged in computer software and IT consulting. It is managing the process of publishing the source code to RISC OS. Company founders include staff who formerly worked for Pace ...
. In 2011
TBA Software To be announced (TBA), to be confirmed (TBC), to be determined or decided or declared (TBD), and other variations, are placeholder terms used very broadly in event planning to indicate that although something is scheduled or expected to happen, a ...
released test versions of an updated BASIC which includes support for VFP/NEON from
assembler Assembler may refer to: Arts and media * Nobukazu Takemura, avant-garde electronic musician, stage name Assembler * Assemblers, a fictional race in the ''Star Wars'' universe * Assemblers, an alternative name of the superhero group Champions of ...
. 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 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 ...
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 In human anatomy, the arm refers to the upper limb in common usage, although academically the term specifically means the upper arm between the glenohumeral joint (shoulder joint) and the elbow joint. The distal part of the upper limb between th ...
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 Acorn Archimedes is a family of personal computers designed by Acorn Computers of Cambridge, England. The systems are based on Acorn's own ARM architecture processors and the proprietary operating systems Arthur and RISC OS. The first mode ...
and the
RiscPC The Risc PC is Acorn Computers's RISC OS/ Acorn RISC Machine computer, launched on 15 April 1994, which superseded the Acorn Archimedes. The Acorn PC card and software allows PC compatible software to be run. Like the Archimedes, the Risc PC co ...
. 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 in-line assembler syntax. The compiler was written in BBC BASIC V. The compiler (running under the interpreter in the early development stages) was able to compile itself, and versions that were distributed were self-compiled object code. 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 The NS32000, sometimes known as the 32k, is a series of microprocessors produced by National Semiconductor. The first member of the family came to market in 1982, briefly known as the 16032 before becoming the 32016. It was the first 32-bit general ...
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 The British Broadcasting Corporation Microcomputer System, or BBC Micro, is a series of microcomputers and associated peripherals designed and built by Acorn Computers in the 1980s for the BBC Computer Literacy Project. Designed with an emphas ...
'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 Tiki-100 was a desktop home/personal computer manufactured by Tiki Data of Oslo, Norway. The computer was launched in the spring of 1984 under the original name Kontiki-100, and was first and foremost intended for the emerging educational sector ...
desktop computer,
Cambridge Z88 The Cambridge Computer Z88 is a Zilog Z80-based portable computer released in 1987 by Cambridge Computer, the company formed for such purpose by Clive Sinclair. It was approximately A4 paper sized and lightweight at , running on four AA batter ...
portable and the
Amstrad NC100 The Amstrad NC100 Notepad was an A4-size, portable Z80-based computer, released by Amstrad in 1992. It featured 64 KB of RAM, the Protext word processor, various organiser-like facilities (diary, address book and time manager), a simple calcul ...
Notepad and
Amstrad NC200 The Amstrad NC100 Notepad was an A4-size, portable Z80-based computer, released by Amstrad in 1992. It featured 64 KB of RAM, the Protext word processor, various organiser-like facilities (diary, address book and time manager), a simple calcu ...
Notebook computers. This version has been implemented on the
TI-83 Plus The TI-83 series is a series of graphing calculators manufactured by Texas Instruments. The original TI-83 is itself an upgraded version of the TI-82. Released in 1996, it was one of the most popular graphing calculators for students. In additio ...
and
TI-84 Plus The TI-84 Plus is a graphing calculator made by Texas Instruments which was released in early 2004. There is no original TI-84, only the TI-84 Plus, the TI-84 Plus Silver Edition models, and the TI-84 Plus CE. The TI-84 Plus is an enhanced ve ...
series
graphing calculator A graphing calculator (also graphics calculator or graphic display calculator) is a handheld computer that is capable of plotting graphs, solving simultaneous equations, and performing other tasks with variables. Most popular graphing calcu ...
s. Due to efforts of J. G. Harston (also responsible for a PDP-11 version) a version o
BBC BASIC
for the
Sinclair ZX Spectrum 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. Referred to during development as the ''ZX81 Colour ...
was released in January 2002, with many improvements made in subsequent releases. For PC-based systems, BBC BASIC was also implemented for
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
as ''BBCBASIC (86)'', which aimed for maximum compatibility with the BBC Micro, and ''BBasic'', which concentrated on the BASIC language, with its own enhancements based on BASIC II. A version of BBC BASIC integrated with the Microsoft Windows
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inst ...

BBC BASIC for Windows
created by Richard Russell, developer of 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 An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
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, supporting Windows, Linux and a number of mobile devices supporting the SDL library, as well as a version which allows the running of BBC BASIC programs as applets in a web-page via the Web Assembly framework. A
GPL The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general u ...
clone of BBC BASIC named ''Brandy'', written in portable C, is also available. An emulator of the BBC Micro for the
Commodore Commodore may refer to: Ranks * Commodore (rank), a naval rank ** Commodore (Royal Navy), in the United Kingdom ** Commodore (United States) ** Commodore (Canada) ** Commodore (Finland) ** Commodore (Germany) or ''Kommodore'' * Air commodore ...
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 The Amiga 500, also known as the A500, is the first low-end version of the Amiga home computer. It contains the same Motorola 68000 as the Amiga 1000, as well as the same graphics and sound coprocessors, but is in a smaller case similar to th ...
, in the hope that schools would replace their ageing BBC Bs with Amiga 500s. BBC Micro publishing house Computer Concepts produced a version of BBC Basic for the Atari ST, named Fast ST BASIC, as a ROM cartridge. 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 series of computers
Applecorn
being one such effort. BBC BASIC is the programming language used in the Agon Light, an 8-bit
Z80 The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The first working samples were ...
-based
single board computer A single-board computer (SBC) is a complete computer built on a single circuit board, with microprocessor(s), memory, input/output (I/O) and other features required of a functional computer. Single-board computers are commonly made as demonstrat ...
and microcontroller designed by Bernardo Kastrup.


Notes


See also

* Dot space


References


External links

* * http://www.rtrussell.co.uk/products/ * http://mdfs.net/bbcbasic/
TI-83+ and TI-84+ implementation of BBC BASIC

The Amstrad NC Users' Site

Ebook programming guide with interfacing methods

BBC BASIC Reference Manual
(for RISC OS)

(HTML)
BBC microcomputer User Guide
(PDF)
Python code vs BBC Basic for Windows

R.T. Russell's Z80 BBC Basic is now open source
a
GitHub
{{DEFAULTSORT:Bbc Basic BASIC programming language family BASIC interpreters Acorn Computers RISC OS programming tools CP/M software Discontinued BASICs Programming languages created in 1981 Programming languages created by women