CapnKroaker.com 20 May 2012
BBC Basic and Beyond
The Model B boot screen
Familiar to millions
The BBC shipped with what many still consider to be a superb example of the Basic programming language: BBC Basic. Certainly most people who used a BBC at home would have at least dabbled with the language, after all the sizeable user guide supplied with the machine, over 500 pages, was devoted nearly exclusively to the programming of the machine.
Now a warning, there's some serious technobabble coming up and while I'm not going to start talking about strange particles and making up peculiar words this could still act as a mind numbing sedative for some. Do you consider yourself suitably warned? Good, read on :)
In contrast to many other variants of Basic of the time BBC Basic supported well organised structured programming through its rich support for function calls and procedures and local and global variables. In contrast many other variants of Basic forced the programmer to construct a spiders web of GOTO statements and peculiarly named global variables.
Type it in!
Type it in!
Ooo a pretty picture
Ooo a pretty picture
Its frightening to consider how many UK programmers working today first cut there teeth with a program like the one on the left. Which incidentally produces the output on the right. Oh and if your looking to get it easy and paste the program on the left into your emulator: forget it. I had to type the damn thing in and I wouldn't want to deprive you of that truly magical feeling of typing it in from a printed listing only to find there's a bug in the code. One final notable feature of BBC Basic was its built in assembler. Using it you could enter the mnemonics of 6502 assembly code and improve the performance of your Basic apps where appropraite or write pure assembly programs.
When writing your games, errr I mean programs, you had a number of different graphic modes to choose from: the Model B supported a total of 8 graphics modes while the Model A featured only a subset of those modes due to memory limitations.  For each it was possible to select the colours to use from a total palette of 16 colours, however 8 of those were 'flashing' colours and there were no flesh tones. Due to this many BBC games had a rather bright feel to them! The modes available to the programmer were as follows.
Mode Text Resolution Graphics Resolution Colours
0 80x32 640x256 2
1 40x32 320x256 4
2 20x32 160x256 16
3 80x25 N/A 2
4 40x32 320x256 2
5 20x32 160x256 4
6 40x25 N/A 2
7 40x25 Teletext Teletext
The memory for the graphics mode selected came out of the machines 32k of RAM and as such choice of mode was always a compromise between resolution and colour depth. With its low resolution and medium number of colours mode 5 was very popular among game developers as it left a reasonable amount of space for the game program itself while still allowing a reasonable number of colours. Modes 0 and 7 are also worth special mention: mode 0 for its high resolution and mode 7 as it enabled Teletext style screens to be displayed and took very little memory. And yes, thats the very same Teletext still viewable on television today.
And with that I'll leave programming the Beeb and move onto what everyone is really interested in: did it have any great games?

<- Back to the hardware Gaming - Model B style ->