A quick synposis on my project:
The BBC Basic for Z80 kernel was written by R.T.Russell around the same time as the original 6502 version that ran on the BBC Micro. The CP/M version was open-sourced in 2019, and I used that core BASIC interpreter in a homebrew computer, with the CP/M code stripped out.
A few weeks ago after a chance conversation on social media, I decided to port it again to the ZX Spectrum Next (a modern reincarnation of the original ZX Spectrum). Whilst it's another Z80-based system, the challenge would be to add in all missing features from the core language such as an editor, graphics, sound, file IO, and so on.
The link above is to my blog, which I'll be updating on a regular(ish) basis with insights into the code. I'll also be updating the Git project page (link to the project in the post) with source code and executable 'nex' files that can be run on a Spectrum Next (or clone), on a MiSTer FPGA running the ZX Next core, or in a Next emulator such as ZEsarUX or CSPect.
Why am I doing this? I think BBC Basic is the best-in-class of its peers. It's performant, and has many modern language features. It's also a pretty cool way to get to grips with the Next hardware. I'm really enjoying working on this. The Spectrum Next is the 8-bit micro I wish I'd had back in the 80s, and the project is interesting, and something I can continuously improve upon.
Hope you enjoy!
So you are saying some part of the (language, compiler, runtime, generated code, etc.) is... what, exactly?
Perhaps one or more of: {Memory-,CPU-,Power-}efficient? Fast? Compact? Reliable/non-buggy? Easy to use? Expressive? Easy to understand, maintain or port? Standards-compliant? Or maybe that it contains a useful and complete API for a certain application domain (e.g. games/sound/animation on the Spectrum Next?) Or maybe it has a nice IDE or workflow? All/some of the above?
And ... compared to what? Other BASIC compilers for ZX or for CP/M? Other CP/M languages/IDEs like Turbo Pascal (which sounds like it was a pretty great environment according to folks on HN at least?)
BBC Basic is recognised as being one of the fastest floating point BASIC interpreters written for 8-bit CPUs. This was partly down to how the language was coded (in 6502 originally), and certain aspects of the BBC Micro's architecture. Although the BBC Micro's CPU was only running at 2Mhz, it had fast RAM chips with little to no contention, despite sharing memory with the video system.
These benchmarks give some indication of relative speeds to its contemporaries.
https://en.wikipedia.org/wiki/Rugg/Feldman_benchmarks
I've run those benchmarks on the Z80 version. It is faster than the native BASIC of the Spectrum (Sinclair BASIC) running at the same CPU speed (3.5Mhz).
https://github.com/breakintoprogram/next-bbc-basic/blob/main...