Hi everyone,
I'm slowly working my way through a series of articles on BASIC on the Wikipedia. I have beaten the Dartmouth, HP-TS and Atari BASIC articles into reasonable shape, and now I would like to do the same for BBC BASIC.
Atari BASIC was one of the slowest BASICs on the 8-bit processors. In spite of running the 6502 at speeds comparable to the BBC, it's BASIC ran Ahl's bench a whopping 20 times slower. It was so slow that the original authors wrote extensively on why this was, so, ironically, decades later there is a superb paper trail on how it works internally.
I am having problems finding similar levels of materials about the inner workings of the original BBC BASIC. I know the source is available, but that is too detailed for what I have in mind. RR suggested this forum might be a good place to ask.
So does anyone know of articles describing how it worked? Something like a Byte level of detail. I know PCW was generally similar to Byte in detail level, at least during this period, but PCW was not available on this side of the pond (Toronto) and it seems sadly missing from Archive.org.
Technical descriptions of BBC BASIC
-
- Posts: 327
- Joined: Wed 04 Apr 2018, 06:36
Re: Technical descriptions of BBC BASIC
I don't know whether archives of "Acorn User" and "BBC Micro User" are available, but from time to time they carried articles or series of articles which may contain the information you need.
Re: Technical descriptions of BBC BASIC
In fact I didn't, my suggestion was to ask at the StarDot forum where you are much more likely to find people who are knowledgeable about the early BBC BASICs, such as the 6502 version and the ARM version (both written by Sophie Wilson); this forum concentrates on supporting BBC BASIC for Windows and BBC BASIC for SDL 2.0. Indeed a major difference beween BBC BASIC and some of the other BASICs you mention is that, almost from the beginning, it has been a cross-platform programming language not specifically tied to either a specific machine or a specific CPU.
My personal belief is that the relatively good performance of Sophie's BBC BASIC interpreters stems more from her expertise as a coder than from the design of the language. Apart from tokenising keywords, which was common at the time, BBC BASIC doesn't use many 'tricks' to improve speed. For example variables are not tokenised, they are represented in memory exactly as they were originally entered (and variable names may be of any length). Similarly numeric constants are not pre-converted to binary, they are represented in the program in plain ASCII (apart from line numbers). GOTO and GOSUB both search the program from the start until the target line is found, which is the slowest method you can imagine (of course BBC BASIC is a structured language so programs need not use GOTO at all).
Things which do contribute to the speed of the language are the variable look-up (which uses 54 linked-lists, one for each possible initial character), the absence of any string garbage collection, and the 26 'static' integer variables (A% to Z%) which can be accessed quickly. But in many respects BBC BASIC is a pretty traditional interpreter, just extremely well implemented by Sophie (and pretty badly implemented by me!).
- hellomike
- Posts: 192
- Joined: Sat 09 Jun 2018, 09:47
- Location: Amsterdam
Re: Technical descriptions of BBC BASIC
Try to find a copy of the "BASIC ROM USER GUIDE for the BBC Microcomputer and Electron Computer" by Mark Plumbley. ISBN 0 947929 04 5
- hellomike
- Posts: 192
- Joined: Sat 09 Jun 2018, 09:47
- Location: Amsterdam
-
- Posts: 2
- Joined: Sun 24 Nov 2019, 22:23
Re: Technical descriptions of BBC BASIC
That is precisely what I'm looking for, thanks!