BBC BASIC Console edition

Discussions related to the BB4W & BBCSDL interpreters and run-time engines
Hated Moron
Posts: 131
Joined: Thu 07 Apr 2022, 10:10

BBC BASIC Console edition

Post by Hated Moron »

On 07/07/2022 15:28, Maksim AbuAjamieh wrote (cross-posted from the Discussion Group):
I am trying to evaluate BBCBASIC console edition on one of my devices (as an option next to Lua), the installation process was easy but I am facing couple of problems:

1. Since it is a console mode version, I am running it on a device with no GUI, I connect to it using an ssh client, but for some reason I am unable to view the lib files or demo files using regular editors like Vim or Emacs, is there a way to make them readable on my device?
I'm assuming that you are referring to the fact that the libraries and demo programs are in 'tokenised' (.bbc) file format rather than plain-text (.bas). If you simply want to view and/or edit the programs the easiest way is probably to load them into one of the GUI versions of BBC BASIC: BBC BASIC for SDL 2.0 or BBC BASIC for Windows; that has the advantage of supporting automatic indentation and syntax colouring.

If however you specifically want to be able to load the programs into a standard text editor like Emacs it will be necessary to convert them to plain-text format first. You can again do that using one of the GUI editions: load the program and then use the Save As menu selection to save it as a .bas file. Alternatively you can use the Console edition to do that using the following commands:

LOAD "progname"
*SPOOL progname.bas

Finally, a BASIC program could easily be written to automate this process (I think I have one somewhere).
2. I did not see anything regarding network capabilties, does it support TCP/IP? can I send a simple ZMQ request with it or create a very basic ZMQ listener? (
The Console Mode editions don't come with a networking library (whereas the GUI editions do). If there's a demand for that I could consider writing one, but in the interim if you are happy with calling low-level network (socket) API functions directly from BASIC (using the SYS statement) then you can certainly do that.
3. Is there any guide about capabilties of this interpreter? (language manual?)
The online manual for the GUI editions is largely relevant to the Console editions too, so long as you ignore references to graphics, sound etc. (and the IDE of course).
4. Is there any guide about extending/module support/etc. If this interpreter is meant to be extended with modules contributed by users, we need to know how to do it.
There's some information about this at the Wiki. Is there anything not covered there that you particularly want to know?
If you are unhappy with any aspect of this post, please report it to the forum administrator (click on the exclamation mark icon in the top-right corner) rather than complaining on the open forum or by private email.