The home of BBC BASIC

R. T. RUSSELL

BBC BASIC for SDL 2.0



Click on picture for full-size version:

Running on Windows
BBCSDL running on Windows

Running on Linux
BBCSDL running on Linux (Ubuntu)

Running on MacOS
BBCSDL running on MacOS

Running on Raspberry Pi
BBCSDL running on Raspberry Pi

Running on Android
BBCSDL running on Android

Running on Amazon Fire TV Stick
BBCSDL running on Amazon Fire TV

Running on iOS
BBCSDL (64-bit) running on iOS

Running in Firefox
BBCSDL running in Firefox

BBC BASIC for SDL 2.0 (BBCSDL) is an entirely free advanced cross-platform implementation of BBC BASIC for Linux (x86 CPU only), MacOS, Raspberry Pi 3 or later (Pi OS), Windows, Android, iOS or for running in a browser. It combines the simplicity of BASIC with the sophistication of a structured language, allowing you to write utilities and games, use sound and graphics, and perform calculations.

The Desktop editions (Linux, MacOS, Raspberry Pi, Windows) include a BASIC program editor with syntax colouring, live indentation, search & replace and many other features. Built-in diagnostic aids such as run-time trace, listing of variables, single-step execution and a profiler make debugging even the most complex programs straightforward.

The Android and iOS editions, for smartphones and tablets, have a simplified interface optimised for touchscreen control. It too provides a BASIC program editor with syntax colouring, live indentation, search & replace and other features; see here for more details.

The in-browser edition also uses the simplified interface, it is compatible with desktop versions of Brave, Chrome, Edge, Firefox, Opera & Vivaldi, and with the Android versions of Chrome† and Firefox Nightly; it will run on a Chromebook. Unfortunately no iOS browsers are currently compatible (Apple does not support the Web Assembly Threads extension).

The Android edition will also run on the Amazon Fire TV or Fire TV Stick and some smart TVs. Several of the supplied example programs can be operated using the navigation wheel and buttons on the remote control, including most of the games. Any sounds or music created by a BASIC program will be played through the speaker(s) of the attached TV.

BBC BASIC for SDL 2.0 is largely compatible with BBC BASIC for Windows; it shares with that dialect many new and advanced features including data structures, PRIVATE variables, an EXIT statment, long strings, event interrupts, an address-of operator, byte variables, a line continuation character, indirect procedure and function calls and improved numeric accuracy. It also retains a high degree of compatibility with the BBC Microcomputer, including emulation of the SOUND and ENVELOPE statements, and the MODE 7 (teletext) screen mode.

Up to 256 Megabytes of memory (16 Mbytes in the in-browser edition) is provided for the user's program, data and stack (subject to sufficient RAM being available). Unlike some older versions of BASIC, you won't suffer the frustration of running out of memory! Line numbers are optional.

BBC BASIC for SDL 2.0 incorporates an assembler* which can be used when the speed or other capabilities of the interpreter are inadequate. The assembler depends on the CPU in your device: 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. You can access Application Program Interface (API) functions from BASIC and from assembler code, allowing an experienced programmer to produce sophisticated applications.

BBC BASIC for Windows programs that call Operating System API functions, or that rely on libraries that do not have a direct equivalent in both dialects, will need to be adapted in order to be compatible with BBCSDL. Also, programs that use the *FONT command will require a small alteration. But otherwise programs can be expected to run with little or no modification. Of course, programs that incorporate assembly language code will not run on an ARM-based Android device or Raspberry Pi without significant changes. Details of the differences between BB4W and BBCSDL may be found here.

BBC BASIC for SDL 2.0 is entirely free and may be downloaded for the supported platforms as follows :

Windows edition (Vista or later) (19.2 Mbytes)
MacOS edition (10.7 or later) (22.1 Mbytes) ‡
Linux edition (32-bit, x86 CPU) (18.2 Mbytes)
Linux edition (64-bit, x86 CPU) (18.3 Mbytes)
Raspberry PiOS edition (32-bit) (18.2 Mbytes)
Raspberry PiOS edition (64-bit) (18.3 Mbytes)
Android edition (KitKat or later) (23.5 Mbytes)
64-bit iOS edition (see below**) (26.0 Mbytes)
In-Browser edition (sorry, not IE or Safari) †

The MacOS, Android and iOS editions are self-installing. The Linux and Raspberry Pi editions must first be unzipped, and then installed according to the instructions in the supplied text file. The Windows edition simply needs to be unzipped to a suitable place. The in-browser edition needs no installation.

‡ On a Mac you will need to override the "unidentified developer" security warning; there are instructions for doing that here. Please note that the app is signed and is therefore protected against tampering; the warning simply means that it has not been reviewed by Apple. This edition is x86 (Intel) code but will run nicely on an M1 ('Apple silicon') Mac under Rosetta 2 emulation.


† To run in Chrome on Android an 'experimental' feature must be enabled: visit chrome://flags/#enable-webassembly-threads.


* The iOS and in-browser editions are exceptions. Because iOS does not permit 'arbitrary code execution' the assembler, the CALL statement and the USR function are not usable. This is a restriction imposed by Apple and is unavoidable.


** The iOS edition requires a device capable of running iOS 11, i.e. an iPod 6th generation, iPhone 5S, iPad Air, iPad Mini 2 or later. Apple's 'ad hoc' distribution mechanism is used so you must supply the UDID of your device(s) as follows:

  1. Connect your device to a PC or Mac running iTunes™, as you would to sync music or photos.
  2. When the device has been recognised by iTunes, click on the corresponding icon that appears.
  3. The Serial Number will be displayed (this is not the UDID); click on it to reveal the UDID.
  4. Right click on the UDID (on a PC, or the equivalent on a Mac) and copy it to the clipboard.
  5. Paste the UDID into an email and send it.
Alternatively (e.g. if iTunes is not available):
  1. Connect your device to a Mac using a USB cable.
  2. From the menu select 'About This Mac... System Report... Hardware... USB... iPhone... Serial Number'.
  3. Despite the description, the number displayed is the UDID (albeit with hyphens removed).
  4. Copy the UDID into an email and send it.

VersionDateModification summary (click on the version number for details)
1.26a19-Nov-2021 New audiolib & gfxlib libraries; new cowboy.bbc & metronome.bbc example programs; minor compatibility improvements & bug fixes.
1.25a08-Oct-2021 PAGE may be lowered (with care!); new SUM operator (modulo-264 addition); stringlib library updated to support 64-bit integers.
1.24a20-Aug-2021 Added GCOL 5-7; relative plot commands don't discard the LSB; fixed a memory leak on string array initialisation; fixed bugs in SDLIDE.
1.23a09-Jul-2021 Added 64-bit Raspberry Pi edition; added msgbox library; updated BBCEdit; more Mac shortcuts; fixed cruncher bugs, and more.
1.22a28-May-2021 Added more Mac keyboard shortcuts; added cradle.bbc & Box2D sample demos; updated sudoku.bbc; some performance optimisations.
1.21a16-Apr-2021 Supports some Mac keyboard shortcuts; added box2ddbg library; added pinball.bbc & voronoi.bbc examples; several minor bug fixes.
1.20a03-Mar-2021 Fixed FOR...NEXT bug in ARM editions; added f1-f4 shortcuts in Ceefax.bbc; removed timeout from sudoku.bbc; several minor bug fixes.
1.19a22-Jan-2021 Extended *dump cmd; new editbox & menulib libraries; new gorillas & textedit examples; new macro recorder for SDLIDE; bug fixes etc.
1.18a04-Dec-2020 New -borderless switch; PTR() accepts FN/PROC name; pdflib.bbc, raytrace.bbc & saa505x.bbc added; BBCEdit updated; bug fixes etc.
1.17a23-Oct-2020 New shaderlib and webgllib libraries; BBCEdit IDE updated; Ceefax.bbc updated to track BBC website changes; bug fixes and more.
1.15a11-Sep-2020 New PTR()= statement and SYS function; SDLIDE has breakpoints and can print a listing; updated Ceefax.bbc & telstar.bbc; bug fixes etc.
1.14a03-Aug-2020 New *dump command, updated IDEs, updated dlglib.bbc & filedlg.bbc, updated SkyBaby.bbc & telstar.bbc examples, bug fixes etc.
1.13a19-Jun-2020 MODE7 & SOUND improvements, smooth listbox scrolling, new classlib & mode7lib libraries, new example sortdemo.bbc, bug fixes & more.
1.12a08-May-2020 Improved file selector, touchide copies directories, new example programs bbclock.bbc, dunebuggy.bbc & kerning.bbc; bug fixes and more.
1.11a27-Mar-2020 Render batching; MODE 7 font changed; new example programs spotlight.bbc, pintograph.bbc & trebuchet.bbc; bug fixes and more.
1.10a15-Feb-2020 Box2D physics engine bundled; kaleidoscope.bbc, crates.bbc, dangle.bbc & lotto.bbc example programs added; bug fixes and more.
1.09a11-Jan-2020 New Memory Monitor utility, dlglib library improved, Ceefax simulator updated to include weather, travel & local news, and more.
1.08a01-Dec-2019 Bug fixes, eventlib made 64-bit compatible, added ellipsefit.bbc, bezierfit.bbc and multitouch.bbc example programs, SkyBaby updated.
1.07a20-Oct-2019 Bug fixes, treeview has a scrollbar, aagfxlib supports dotted/dashed lines, listboxes can be drag-scrolled, new SkyBaby example program.
1.06a03-Sep-2019 Antialiased graphics (via new aagfxlib library); assembler fixes; aagfxdem.bbc, knots.bbc & BBSterm.bbc example programs added.
1.05a25-Jul-2019 Bug fixes, Goto Line in SDLIDE, combobox support, updated DejaVuSans font, new fluid.bbc & 3D animation to accompany skaters.bbc .
1.04a23-Jun-2019 VDU 23,24,n| adjusts character spacing; @tmp$ is now always user-specific; hangman.bbc & figleaf.bbc example programs added.
1.03a12-May-2019 BBCEdit IDE updated; Search BASIC programs utility added; multi-column list boxes; mandel.bbc rewritten to run on all platforms.
1.02a04-Apr-2019 ARM & 64-bit editions buffer files; dlglib includes trackbar support; new polydots & recorder examples, telstar.bbc updated, bug fixes.
1.01a23-Feb-2019 VDU 23,23 works with circles/ellipses/arcs; RECTANGLE SWAP added; SDLIDE improvements; disco, slitscan, surks & swirl examples.
1.00a01-Feb-2019 SDLIDE loads Acorn-format files, Cross Reference utility, ARM align directive, ellipse & treeview libraries, seascape & ellipses examples.

cover photo


Home - Products - Contact us

Best viewed with Any Browser Valid HTML 4.0!
© Richard Russell 2021