Hello, Guest the thread was called8.4k times and contains 203 replays

last post from hjalfi at the

BBC BASIC for the MEGA65?

  • The BBC Basic is just another fascinating Basic from the 80s.

    Not less and not more.

    No, I'm afraid I completely disagree with that.


    For a start, it's not "just another" version of BASIC from the 80s; it's THE BEST version of BASIC from the 80s; some might say the best version of BASIC ever, in fact.


    It's also probably the most widespread version of BASIC ever to appear, in terms of the number of processors and systems it got ported to. There are multiple versions of it for the BBC series, including the Z80 and ARM second processors. There was an official release of it for the Cambridge Z88 portable machine. There were many releases of it for other machines, including the Sinclair Spectrum, Amstrad CPC range and Tatung Einstein. There's even a CP/M version of BBC BASIC for any 'business' machine with CP/M 2.2 or later. In terms of modern systems, there's a well-supported version of BBC BASIC for Windows, and options also available for the Mac (including a new one that I'm aware of a former Acorn developer working on at present). And I believe there's even some sort of development system (haven't looked into it yet) that lets you write Android apps in BBC BASIC, which sounds mega-useful if you're an Android user. So if you write a program in BBC BASIC and want to run it on another system, there's a very good chance that you'll be able to port it very easily. Regardless, with all that in mind, this is hardly just a relic from the 1980s: it's a superb modern language that people still use today, and that makes porting a piece of software from one system to another pretty easy. OK, maybe it's not generally useful for writing commercial cross-platform apps; but it's potentially very useful for hobbyists and amateurs to convert their projects from one machine to another, or adapt education material between systems or whatever. (And note the Android app scenario.) I'm sure there's still plenty of potential uses that let people achieve things without having to devote themselves to becoming professional developers.


    And this is also all said without considering the fact that BBC BASIC continued to be developed massively beyond BASIC IV. BASICs V and VI debuted on the ARM-based Acorn Archimedes and have continued to be developed ever since, right up to today. You may say: RISC OS is now only a niche OS with hardly any users and few if any meaningful applications left in the real world. And maybe there's some truth in that. But… it does still have potential, it's still being worked on and made relevant for modern hardware, and you can run it on modern hardware like the Raspberry Pi and other cheap single-board computers. So if anyone wanted to use RISC OS to create a lightning-fast Raspberry Pi-based project of some sort (the possibilities are endless…), they could very easily do so and write all the control software in BBC BASIC.


    Moreover, although BBC BASIC in its latest incarnation is restricted to RISC OS, there's absolutely no reason why it couldn't be liberated to run on some other ARM-based OS if anyone were minded to do the necessary conversion work. It's completely open source now. If someone wanted a stunningly good version of BASIC to run on some ARM-based Unix variant, why not just grab the ARM BBC BASIC sources and port it? Stranger things have happened.


    Obviously I'm smoking the pipe a bit here and getting into speculative territory… but my main point is that BBC BASIC is still alive and being actively developed (for the latest 64-bit ARM processors), and it's an outstandingly fantastic version of the language which must be unbelievably fast on current ARMs (even back in the late 1990s, its interpreted performance on a StrongARM processor could often outperform compiled C code, because the whole interpreter fit in the processor cache!). It's also open source, and thus has no practical restriction for its future use. All it needs is people to take more interest in it again.


    One has to wonder why BASIC ever fell out of fashion as an introduction to programming. If BBC BASIC had been more widely used around the world, and had the UK not misguidedly moved from Acorns to PCs in schools in the 90s, it would probably have remained dominant. I've seen several people in recent times lamenting how inferior Python is as an introduction to programming in schools (though I can't comment on that, as I've never looked into Python myself and know nothing about it). You ask: "What would make a good modern BASIC?" I'm not sure the question needs an answer, because we already have that in the latest ARM version of BBC BASIC V/VII. It's surely by far the best and most widely established version of BASIC around. The only problem with it, really, is that it hasn't been made available to other ARM-based OSs other than RISC OS. It's a great shame that it doesn't come as standard on all ARM-based systems, really.

    As to whether it's really a good language for modern computing… I think the obvious point to make about it is that it's a procedural language. Does a modern language need to be object-oriented? If so, then that's the glaring shortcoming. Maybe there's a way in which it could be extended with object-oriented concepts. I don't see why not; it's every bit as well structured as other high-level modern languages, and – what's more – it's also modular, with the ability to use libraries and overlays, and split your source across multiple files if you want to. So maybe a good modern BASIC would simply be BBC BASIC with OO extensions. I don't see any reasons why it couldn't be done… but I'm only a hobbyist, not a programmer of that level, so I really can't say. Surely, though, if ANY version of BASIC is worthy of further work to turn it into a new object-oriented version of the language, BBC BASIC is that version.

    Anyway, you'll take my point by now. BBC BASIC is the best-performing BASIC ever (as verified by many tests over the years), almost certainly the best designed, most extensive and well-structured implementation yet written, and also probably the most widespread in terms of the number of systems you can run it on. Get it on the MEGA65 and you gain access to all that world of software, including ease of conversion of programs from one system to another. Plus it's open source (at least in its still-in-development form). It's as far as I think any version of BASIC reasonably can be from being a simple outdated relic from the 1980s. BASIC in general may have lost a lot of its position of dominance in the computing world, which in some ways is regrettable – but if you do want to use BASIC (and there's still plenty of reason to), as far as I'm concerned this is the best version available by a wide margin.

  • Today three books arrived, which I had printed from the corresponding "remastered" PDF files from an online provider. This makes it easier for me to quickly look up something and also to enter my own notes with the pen. "Old fashion style" ... :)



    If you are interested in how ordering your own books, I have also created a post (in German): Click here

  • Just in case any further inspiration is needed… I've just discovered to my interest that Dean Belfield has just ported BBC BASIC to the ZX Spectrum Next!


    He started out from the Z80 version for CP/M – which, interestingly, is apparently already open source – and in just about a week has produced a fully working straight port of the language, with a number of additional commands to support the Spectrum Next's hardware. I've only just found out about this, so I haven't tried it out yet myself, but it looks quite an exciting development – even given that the Next already has its own new and very fully featured version of Sinclair BASIC that exploits its enhanced hardware.


    This is an entirely separate port from the existing version of BBC BASIC for the regular Sinclair Spectrum.


    Anyway, the link to the author's blog post about the project is here:
    Blog post about BBC BASIC for ZX Spectrum Next

    …and the Github repository containing the source code and releases is here:
    BBC BASIC for ZX Spectrum Next (Github)


    Dean Belfield announced the port on the Spectrum Next Facebook group with the following words:

    Quote

    Had a bit of a mad idea last week inspired by a conversation on Twitter. I'd already started porting R.T.Russell's excellent BBC Basic for Z80 to my homebrew breadboard computer, and wondered how easy it would be to port what I'd done already to the Next.

    It's very much a work-in-progress, yet works as a programming language as it stands now. The intention is to complete it with full Next hardware support.

    Source code and ".nex" files can be found on my GitHub.

    Enjoy!

    This rather backs up my assertions that interest in BBC BASIC is far from dead!

  • Gosh, look away for a few months and there's a billion messages to work through. Good to know there's so much interest!


    A couple of quick points:


    (a) R.T.Russell's Z80 port is open source --- I was the one who contacted him and asked him to relicense. He owns it, so he's capable of definitively doing this. http://cowlark.com/2019-06-14-bbcbasic-opensource It's pretty nice. If you're planning on doing a BBC Basic for the 6502, this may be the place to start. Even though anything which involves actual computation will need to be reworked for the 6502, the overall design will probably still be valid. It's completely compatible with Sophie Wilson's original, and even has a Z80 assembler in it.


    (b) If you can't get a definitive statement on the ownership of any piece of source code, it's cursed, and stay well clear. I've been trying to track down ownership of lots of old CP/M stuff to try and put together a proper open source CP/M port (see http://cowlark.com/cpmish). This is really frustrating because a lot of it predates the days when people understood licenses, and a lot of what source code remains is unusable because it either doesn't have a license on it (which means all permissions default to off; you can't do anything with it unless expressly given permission by the author) or else is invalid --- I see things like '(c) Public Domain' or 'Public Domain For Non-Commercial Purposes' depressingly often. Using any of this stuff is a massive legal liability. It doesn't matter that the actual copyright owners are dead or if nobody will care --- it won't pass legal oversight and any organisation with assets to lose won't touch it with a bargepole.


    Also, there is actually a extension ROM for BBC Basic II (to IV) for the BBC which provides some Basic V features. So, multiline IF, WHILE, CASE, more graphics commands, etc. But of course source has been lost, and it's probably not relevant anyway due to being an extension ROM. https://stardot.org.uk/forums/viewtopic.php?t=13283


    Also also, if you're looking for an emulator, there's a superb cycle-accurate Javascript one at https://bbc.godbolt.org/. Here's a video of a chiptune tracker I wrote for the BBC in it...