HOME

TheInfoList



OR:

BBC BASIC is an interpreted version of the
BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
programming language. It was developed by Acorn Computers Ltd when they were selected by the
BBC The British Broadcasting Corporation (BBC) is a British public service broadcaster headquartered at Broadcasting House in London, England. Originally established in 1922 as the British Broadcasting Company, it evolved into its current sta ...
to supply the computer for their BBC Literacy Project in 1981. It was originally supplied on an installed
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
for the BBC Microcomputer which used a 6502 microprocessor. When Acorn produced the
Archimedes Archimedes of Syracuse ( ; ) was an Ancient Greece, Ancient Greek Greek mathematics, mathematician, physicist, engineer, astronomer, and Invention, inventor from the ancient city of Syracuse, Sicily, Syracuse in History of Greek and Hellenis ...
computer which used their ARM processor, further versions of BBC BASIC were produced. Acorn included a built in assembler, first for the 6502 and later for the ARM2 processor. Initially the BBC specified compatibility with
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 v ...
. Acorn were already extending their earlier Atom BASIC to include
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making specific disciplined use of the structured control flow constructs of selection ( if/then/else) and repet ...
constructs. Particularly on the later Archimedes computers as the memory constraints reduced, BBC BASIC incorporated a more complete set of structured programming constructs commonly found in the
ALGOL 60 ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a ...
group of computer languages. Alongside Acorn's version of BBC BASIC on the Archimedes, third party companies produced compiled versions of the language. Development and support has continued after the demise of Acorn Computers Ltd for newer ARM based computers. BBC BASIC is now available on other platforms either for emulators such as on MS Windows or natively.


History


Precursor languages

At
Dartmouth College Dartmouth College ( ) is a Private university, private Ivy League research university in Hanover, New Hampshire, United States. Established in 1769 by Eleazar Wheelock, Dartmouth is one of the nine colonial colleges chartered before the America ...
, two mathematics professors wanted all students to be able to program on their new college computer. The existing high-level languages, like FORTRAN and
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
, were used by professionals and not really suitable for introductory programming by non-technical users. In 1964, they created
Dartmouth BASIC Dartmouth BASIC is the original version of the BASIC programming language. It was designed by two professors at Dartmouth College, John G. Kemeny and Thomas E. Kurtz. With the underlying Dartmouth Time-Sharing System (DTSS), it offered an interac ...
(short for Beginner’s All-Purpose Symbolic Instruction Code) to be a computer language anyone could use. Having a formula-based
syntactic In linguistics, syntax ( ) is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituency ...
structure, it is a simplified FORTRAN. A combination of factors led to BASIC becoming a major language in the late 1960s, and in the 1970s when the first
microcomputer A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (P ...
s were being built, it was already the ''de facto'' standard for small systems. The introduction of the Altair 8800 cemented the position of BASIC as the first programming language introduced for the platform was
Paul Allen Paul Gardner Allen (January 21, 1953 – October 15, 2018) was an American businessman, computer programmer, and investor. He co-founded Microsoft, Microsoft Corporation with his childhood friend Bill Gates in 1975, which was followed by the ...
and
Bill Gates William Henry Gates III (born October 28, 1955) is an American businessman and philanthropist. A pioneer of the microcomputer revolution of the 1970s and 1980s, he co-founded the software company Microsoft in 1975 with his childhood friend ...
'
Altair BASIC Altair BASIC is a discontinued interpreter for the BASIC programming language that ran on the MITS Altair 8800 and subsequent S-100 bus computers. It was Microsoft's first product (as Micro-Soft), distributed by MITS under a contract. Altair B ...
. As new micros were introduced, almost all of them ran some variation of BASIC as its primary interface.


BBC's involvement

During the 1970s, the BBC Continuing Education Department was considering how advancements in computer related technology would impact British society. Their Microelectronics Report in 1979 to the
Manpower Services Commission The Manpower Services Commission (MSC) was a non-departmental public body of the Department of Employment in the United Kingdom created by Edward Heath's Conservative Government on 1 January 1974 under the terms of the Employment and Training ...
describes formally their concerns about increasing polarisation and alienation in the workplace. The BBC required a
microcomputer A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (P ...
usable for demonstrations in their programming that could be purchased by the general public to enable the viewer to themselves experiment. They decided that such a microcomputer needed to be robust, have expansion capabilities and an implementation of BASIC compatible with Microsoft BASIC VN5. Jointly the government and the BBC established a public awareness and education campaign. This Computer Literacy Project (1980-1989) used the BBC's choice of the BBC Microcomputer produced by Acorn Computers Ltd. BBC BASIC was central to the user programming experience.


Acorn's involvement

Acorn first developed System BASIC and Atom BASIC for their early 6502 microprocessor computers that were sold to kit-build customers. With the development of the Proton as a Front-end processor, Acorn were designing for more powerful computing. In order to produce a computer to satisfy the BBC specification, the Proton became the BBC Microcomputer, usable as a stand alone computer. By retaining the capability to be connected to a Z80 computer, Acorn was able to comply with the requirement of a computer supporting
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
.
Sophie Wilson Sophie Mary Wilson (born Roger Wilson; June 1957) is an English computer scientist, a co-designer of the instruction set for the ARM architecture. Wilson first designed a microcomputer during a break from studies at Selwyn College, Cambridge. ...
developed the implementations of BASIC at Acorn. The dialect on the BBC Microcomputer became compatible with Microsoft BASIC and so was acceptable to the BBC. It already had features from the ALGOL 60 group of computer languages that Wilson added to enable some structured programming methodology to be used.


Platforms and versions


BBC Micro

The full version list is available here: BASIC I, the original version, was shipped on early
BBC Micro The BBC Microcomputer System, or BBC Micro, is a family of microcomputers developed and manufactured by Acorn Computers in the early 1980s as part of the BBC's Computer Literacy Project. Launched in December 1981, it was showcased across severa ...
s. 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 The Zilog Z80 is an 8-bit computing, 8-bit microprocessor designed by Zilog that played an important role in the evolution of early personal computing. Launched in 1976, it was designed to be Backward compatibility, software-compatible with the ...
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. 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 an operating system designed to run on ARM architecture, ARM computers. Originally designed in 1987 by Acorn Computers of England, it was made for use in its new line of ARM-based Acorn Archimedes, Archimedes personal computers an ...
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 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 RISC OS () is an operating system designed to run on ARM architecture, ARM computers. Originally designed in 1987 by Acorn Computers of England, it was made for use in its new line of ARM-based Acorn Archimedes, Archimedes personal computers an ...
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 Private company limited by guarantee, limited company engaged in computer software and IT consulting. It is managing the process of publishing the source code to RISC OS. Company founders incl ...
. 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 The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic originally established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard #Design rationale, add ...
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 The BBC Microcomputer System, or BBC Micro, is a family of microcomputers developed and manufactured by Acorn Computers in the early 1980s as part of the BBC's Computer Literacy Project. Launched in December 1981, it was showcased across severa ...
's Zilog Z80 second processor, a Z80-based version of BBC BASIC also exists for
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
-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 calculator Graphing Calculator may refer to: * Graphing calculators, calculators that are able to display and/or analyze mathematical function graphs * NuCalc, a computer software program able to perform many graphing calculator functions * Grapher, th ...
s. Due to efforts of J. G. Harston (also responsible for a
PDP-11 The PDP–11 is a series of 16-bit minicomputers originally sold by Digital Equipment Corporation (DEC) from 1970 into the late 1990s, one of a set of products in the Programmed Data Processor (PDP) series. In total, around 600,000 PDP-11s of a ...
version) a version o
BBC BASIC
for the
ZX Spectrum The ZX Spectrum () is an 8-bit computing, 8-bit home computer developed and marketed by Sinclair Research. One of the most influential computers ever made and one of the all-time bestselling British computers, over five million units were sold. ...
was released in January 2002, with many improvements made in subsequent releases. 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, with its own enhancements based on BASIC II. A version of BBC BASIC integrated with the
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...

BBC BASIC for Windows
created by Richard Russell, developer of the Z80 and
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
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 An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
routines or those in an external DLL. Recent versions have included advanced features comparable with languages like C, and an external
library A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
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, as well as a version which allows the running of BBC BASIC programs as applets in a web-page via the Web Assembly framework. Programs can be run via the interpreter or compiled to a standalone application bundle which will run without BBC BASIC having to be installed (.exe file in Windows, .dmg file in MacOS, .zip file in Linux or Raspberry Pi OS and .apk file in Android). A high degree of compatibility with the BBC Microcomputer is also retained, including emulation of the SOUND and ENVELOPE statements, and the MODE 7 (teletext) screen mode. BBC BASIC for SDL 2.0 incorporates an assembler which depends on the CPU in the platform: x86 (32-bit or 64-bit) for Windows, MacOS or Linux; ARM (32-bit or 64-bit) for Raspberry Pi. In the case of Android the assembler is ARM or x86 as appropriate. Application Program Interface (API) functions can be accessed from BASIC and from assembler code, allowing an experienced programmer to produce sophisticated applications. A GPL clone of BBC BASIC named ''Brandy'', written in portable C, is also available. A fork of this, ''Matrix Brandy'', remains under active development. An emulator of the BBC Micro for the Commodore
Amiga Amiga is a family of personal computers produced by Commodore International, Commodore from 1985 until the company's bankruptcy in 1994, with production by others afterward. The original model is one of a number of mid-1980s computers with 16-b ...
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 In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a Sign (mathematics), signed sequence of a fixed number of digits in some Radix, base) multiplied by an integer power of that ba ...
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, was the first popular version of the Amiga home computer, "redefining the home computer market and making so-called luxury features such as multitasking and colour a standard long before Microsoft or Apple ...
, 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 Texas Instruments Incorporated (TI) is an American multinational semiconductor company headquartered in Dallas, Texas. It is one of the top 10 semiconductor companies worldwide based on sales volume. The company's focus is on developing analog ...
calculator families by Benjamin Ryves. A
Commodore 64 The Commodore 64, also known as the C64, is an 8-bit computing, 8-bit home computer introduced in January 1982 by Commodore International (first shown at the Consumer Electronics Show, January 7–10, 1982, in Las Vegas). It has been listed in ...
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 Apple II ("apple Roman numerals, two", stylized as Apple ][) is a series of microcomputers manufactured by Apple Computer, Inc. from 1977 to 1993. The Apple II (original), original Apple II model, which gave the series its name, was designed ...

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 Single-board microcontroller, microcontroller designed by Bernardo Kastrup and released in 2022.


Sample code


See also

* Dot space


References


External links

* http://www.bbcbasic.org * 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 programming language BASIC interpreters Acorn Computers RISC OS programming tools CP/M software Discontinued BASICs Programming languages created in 1981 Programming languages created by women