Inline assembly, which also hadn't been invented yet other than by embedding raw opcodes in DATA statements, is absolutely required to get the performance required for gaming: I still cherish my HiSoft Devpac tape (officially purchased and shipped from the UK at great expense and requiring extensive negotiations with the local customs people, for whom this entire 'software' thing was a bit new...) and Z80 assembly reference (pirated from a library with the school photocopier). So, in one sense, the limited BASIC was a blessing: it required you to really get to know your machine, which is probably the first and last time in my life that happened: I've not considered the timing implications of the CRT and optimized my code around that for a long time.
Nice to see people are still enjoying a 44-year-old platform!
It's that you could LIST. Then move cursor up and edit and press enter. (Not found in ZX, but still ok).
Next, you could list, and draw CIRCLE over the program listing. It was live, like smalltalk, but simpler.
Reproducing language variants without immersion described above is not full story.
- IF THEN
- FOR
- GOSUB / RETURN
- DEFN
- GOTO
- READ / DATA
That was the same thing that any 8 bit BASIC of the era.
I have yet my books of learning BASIC (for kids), and there for ZX Spectrum, Commodore, Apple 2, etc... And only had that. The only thing that I remeber lacking compared againts other BASICs, was the ON GOTO, ON GOSUB and ELSE . On the control of flow in BASIC... That is all.
I will not see something more advanced (and without numbering the lines), like while and do loops, or select case, proper subrutines and functions, until I touch Turbo BASIC (and QBASIC)
Also one feature that 8 bit BASIC lost in the process due to their hardware limitations, was that originally Dartmouth BASIC wasn't interpreted, rather compiled into machine code before execution, a kind of primitive JIT.
Only 8 bit computers able to run CP/M got similar kinds of BASIC experience, like the original one.
This is probably a too-wild idea, but what I personally would love to see would be to adopt the extensions of Dr Andy White's BetaBASIC.
I wrote most of the Wikipedia article about BetaBASIC:
https://en.wikipedia.org/wiki/Beta_BASIC
Even 40+ years later, it remains one of my favourite ever BASIC dialects. I did badly miss integer variables, but it was IMHO the most thoughtful and considered extension of Sinclair BASIC ever made.
I am a little sad that the SAM Coupé's BASIC, which Wright also wrote, has never had a FOSS clone.
However, I got a structured BASIC for the Speccy in a MicroHobby or Micromania magazine (cannot remember exactly), with screen editor, but naturally had the problem it would make the 48 KB memory size even smaller.
It would work better on the 128 KB models, but those lucky ones to own a 128 +3A could get hold of CP/M, with support for Mallard BASIC, CBASIC and BASCOM.
If you still want to work on it, add sample code. I think that’s a must for a programming language page.
I see https://en.wikipedia.org/wiki/Sinclair_BASIC doesn’t, either but at least it has a list of commands. I still prefer sample code, though. It is the better way to present things, even though it will give an incomplete overview of capabilities.
About
About Boriel BASIC SDK
ChangeLog
A reduced list of changes/bugfixes
Installation
How to install Boriel BASIC SDK in your system, and prerequisites for doing so.
SDK tools
Tools available in the SDK.
Command line options
Command line options table for the compiler (zxb)
Get the latest version of Boriel BASIC from the archive.
Language syntax
Language Syntax is very close to the original Sinclair BASIC, but it's expanded and enhanced.
Data types
Language data types: Instead of working always with Floating Point numbers (also available), there are also some integer types which are faster an take less memory.
Reserved words
Comprehensive list (alphabetically ordered) of identifiers you shouldn't use as a ''variable name''. E.g. FOR, PRINT. If you want usage instructions on a statement, also look here.
Standard libraries
Standard libraries that comes bundled with Boriel BASIC compiler.
Programming tutorials
A collection of third-party tutorials about development with Boriel BASIC.
Sample Programs
Sample programs you can try to see what Boriel BASIC looks like and how fast it runs.
Sample Games
Some little games examples.
Embedding inline assembler in your code is pretty easy. There's a tutorial on it.
Only for true hackers: This explains how the compiler does its job, how to expand it, etc. This is work in progress.
Boriel BASIC was designed from the base as a Retargeable Compiler, so it should be not hard to extend it to other architectures. This is work in progress. See other architectures for more info.
You can issue a Pull Request to the GitHub repository, report bugs in the forum when using the compiler, suggest new features...