Differences from BB4W
Click on picture for full-size version:
BBC BASIC for SDL 2.0 (BBCSDL) is an entirely free and Open Source
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; it will run on a Chromebook. Unfortunately no iOS browsers are compatible (Apple's WebKit currently 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 :
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.
‡ 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.
† Although it will not currently run in mainstream Safari, it will in Safari Technology Preview release 137 or later.
* 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: