Click on picture for full-size version:
Towers of Hanoi demo
Chess game
Eight Queens puzzle
Snake game
Sorting demo
Sudoku solver
Patience (Solitaire)
|
The BBC BASIC Console Mode editions are advanced cross-platform implementations of
BBC BASIC for Windows (Windows 10 or later, 64-bit), Linux
(x86, 64-bit), Mac OS-X (64-bit), Raspberry Pi (PiOS, 32-bit or 64-bit) and the Raspberry Pi Pico.
They do not support sound* or graphics but
otherwise are highly compatible with BBC BASIC for Windows and
BBC BASIC for SDL 2.0.
They share with those dialects many new and advanced features
including data structures, PRIVATE variables, an EXIT statment, long strings, timer interrupts, an
address-of operator, byte variables, a line continuation character,
indirect procedure and function calls and improved numeric accuracy. Up to 256 Megabytes of
memory is provided for the user's program, data and stack.
The Console Mode editions take their input from stdin and send their output to stdout so
may be run at a regular command prompt or in a client-server context (e.g. through a network or serial connection,
or even via the internet). The console/terminal is assumed to be VT-100 compatible, which the great majority are,
in which case most of the standard BBC BASIC VDU commands behave as expected (with the exception of
graphics commands), although text viewports are not supported.
Alternatively these editions may be used in CGI (Common
Gateway Interface) applications, or as a shell replacement. Common shell commands may be
accessed by prefixing them with a star (*), in the usual BBC BASIC way.
Limited program entry and editing capabilities are provided in Immediate Mode by means of the AUTO, DELETE, EDIT, LIST [IF], LISTO,
LOAD, NEW, RENUMBER and SAVE commands, but in the case of large programs you are recommended to use either the
BBC BASIC for Windows or BBC BASIC for SDL 2.0 IDE. The LOAD command will load a program in internal (tokenised)
format or as a plain-text file (line numbers will be added if necessary). A BASIC program may be executed automatically by specifying
it as a command-line parameter (it must be in tokenised format) or by giving it the same name as the executable but with a
.bbc extension.
The Console Mode editions incorporate an assembler for the appropriate CPU (a 64-bit
x86 assembler in the case of the Windows, MacOS† and Linux editions, a 32-bit or 64-bit ARM assembler in the
case of the Raspberry Pi editions and a Cortex-M0+ assembler for the Raspberry Pi Pico).
You can access Application Program Interface (API) functions from assembler code
and from BASIC (using the SYS statement), allowing an experienced programmer to produce
sophisticated applications.
These editions are entirely free and may be downloaded for
the supported platforms as follows :
In each case the zip file contains the executable, some libraries and a few demonstration BBC BASIC programs; the contents should be extracted
to a suitable directory. You may wish to add this directory to your PATH so that the executable and libraries can be accessed
from 'anywhere'.
† The Mac M1 ('Apple silicon') edition has an AArch64 assembler, but with only limited usefulness because Apple enforces the
Hardened Runtime
on that platform.
‡ The Raspberry Pi Pico edition is a uf2 file containing a flash image, including an initialised filesystem.
It supports the regular Pico (1) and the Pico W, the latter including network access via WiFi.
* The Raspberry Pi Pico edition does support the SOUND and ENVELOPE statements, and the *TEMPO, *STEREO
and *VOICE commands, if a few external components are fitted (or it is used in conjunction with the VGA Demo Base).
Version | Date | Modification details |
0.47 | 23-Oct-2024 |
Global integer arrays are now guaranteed to be 4-byte aligned (previously only LOCAL arrays were). | .
0.46 | 28-Apr-2024 |
Increased default heap memory to 32 Mbytes; updated arraylib library; added sortlib library & sorttest example program. | .
0.45 | 03-Sep-2023 |
Fixed failing to open a file with a comma in its name; fixed a bug causing SYS sometimes to crash in Windows. | .
0.43 | 23-Mar-2023 |
Use unbuffered I/O for TTY devices. | .
0.42 | 16-Mar-2023 |
Command line options -help, -load, -quit; new libraries socklib, mysqllib; new examples client, server, lanchat, mysqldem. | .
0.41 | 18-Mar-2022 |
Added support for serial I/O (e.g. EXT# returns count of waiting characters); added new example program animal.bbc.
|
0.40 | 24-Jan-2022 |
Fixed @% bug; hex pointers used by * commands are unsigned; fixed warning from GCC 11; added new example solve.bbc.
|
0.39 | 27-Nov-2021 |
Fixed a crash on entering the maximum length response (255 chars) to INPUT LINE; added a new example patience.bbc.
|
0.38 | 21-Oct-2021 |
Added the SUM operator (modulo-64 bit addition); added a working assembler to the Raspberry Pi Pico edition.
|
0.36 | 26-Aug-2021 |
Fixed a memory leak on string array initialisation; reduced the memory footprint; mods to support the Raspberry Pi Pico.
|
0.35 | 16-Jul-2021 |
Added a 64-bit Raspberry Pi edition; updated the Mac M1 edition with an AArch64 assembler (although limited usefulness).
|
0.34 | 11-Jun-2021 |
Worked around apparent MinGW _ftelli64() bug; improved speed by about 10% by optimising the expression evaluator.
|
0.33 | 19-Apr-2021 |
QUIT n sets exit code; FOR...NEXT loop variable promoted to float; fixed RIGHT$(s$)= bug; new sudoku.bbc example.
|
0.32 | 12-Mar-2021 |
Fixed *KEY not accepting (e.g.) |!|H; fixed FOR...NEXT bug in Raspbian edition; added calendar.bbc & sortdemo.bbc.
|
0.31 | 30-Jan-2021 |
Supports command-line > 255 characters; structure made static for CentOS; *KEY accepts leading spaces; Mac M1 edition.
|
0.30 | 15-Dec-2020 |
Changed 'autorun' priority; *DUMP accepts start & end offsets; fixed files being padded; fixed *cmd near end of library crash.
|
0.29 | 09-Nov-2020 |
Fixed a one-byte buffer overrun in the *KEY command; extended PTR() to accept a FN/PROC name as a parameter.
|
0.28 | 07-Oct-2020 |
Fixed a subtle bug that could cause unwanted behaviour if ON ERROR LOCAL was used in a nested function.
|
0.27 | 01-Oct-2020 |
Fixed ON ... PROC bug.
|
0.26 | 12-Sep-2020 |
File pointers (PTR#) are always 64-bits; new PTR()= statement and SYS function; extended =PTR() function.
|
0.25 | 04-Aug-2020 |
Fixed assigning a string to a numeric variable not reporting 'Type mismatch'; added libraries in the lib/ directory.
|
0.24 | 22-Jul-2020 |
'Fatal' errors return to immediate mode rather than quitting; short text programs should not be misidentified as tokenised.
|
0.23 | 18-Jul-2020 |
Introduced different timeouts for one-way (client → server) and round-trip (server → client → server) communication.
|
0.22 | 17-Jul-2020 |
Escape timeout doubled from 100 to 200 ms.
|
0.21 | 13-Jul2020 |
The LOAD command will now load a program in plain-text format as well as in ('Russell') tokenised format.
|
0.20 | 11-Jul-2020 |
Console input handled in a separate thread.
|
|