The London Review of Books recently published a lovely, loving piece on the BBC Micro. I enjoyed it immensely - but being an unreconstructed Beeb nerd I had to highlight one small error:
Thomas Jones writes that ‘the limitations of a 32K memory revealed themselves most bluntly in the fact that our computer couldn’t count any higher than 32,767’ (LRB, 22 June). The BBC micro used 32 bit integer variables, so it had no problems with numbers far larger than 32,767 and, in any event, that limitation would have had nothing to do with the amount of memory.
It’s not quite right to say, as Andy Armstrong does, that the BBC Micro used 32-bit integer variables (Letters, 3 August). Like nearly all modern computers, the 6502 central processing unit (CPU) that the Beeb was based on uses binary digits (bits). The 6502 has instructions built into its hardware to move bits around in groups of eight and to add and subtract 8-bit numbers: it is an 8-bit micro. For any other arithmetic operations (addition involving numbers bigger than 255, multiplication, division etc) someone would have to write software.
More modern CPUs move bits around in groups of 32 or 64, and have built-in instructions for a wide range of arithmetic operations. BBC BASIC has several built-in data types, including 32-bit integers. Different software running on the BBC Micro can manipulate much larger integers. BBC BASIC first ran on BBC microcomputers, but has since been made available on many other, newer computer systems. Armstrong seems to have confused the hardware (BBC Micro) and its inherent capabilities with the software (BBC BASIC), which could be run on a different computer, or be replaced by different software with better or different capabilities.
Thomas Jones got a ‘syntax error’ when he typed 32768 at the BBC BASIC command line because BBC BASIC assumes that any input which begins with a number is a line of a program. But its internal data structure allocated only 15 bits for storing line numbers, so the highest possible line number was 32767. My favourite BBC BASIC error message is line number related, too. Typing ‘RENUMBER 10, 0’ at the command line provokes the reply: ‘Silly’.
OK, so Roddy just wants to parade his geek credentials; nothing wrong with that - that’s why I wrote my letter in the first place. His facts are pretty much straight too. The only problem is that they don’t actually disagree with what I said - so he’s obliged to spin his letter as a correction of mine so that it’s worth printing. Unfortunately that necessarily involves implying that I don’t know what I’m talking about - in other words it involves flipping the big red switch in my head that has a sign hanging from it saying “Don’t touch this switch. Ever” and then in small print “Yes I know that the mere fact of this sign’s existence makes every fibre of your being yearn to find out what happens if you flip the switch - but trust me - you really, really don’t want to. Cubed.”
My first plan relied on LRB not actually having the ability to run a BBC BASIC program. I’d find an excuse to get them to print a short obfuscated program - innocent to the untrained eye but with a vicious payload. Perhaps when run it’d print “Roddy is a poop head” - or maybe something even stronger. I’m sure a certain small scale notoriety might ensue but I couldn’t run the risk of them not printing anything so instead I’ve just sent them this:
With reference to Roddy Graham’s letter published in LRB, 7th Sept 2006:
I’m amused to read that “Armstrong seems to have to have confused the hardware (BBC Micro) and its inherent capabilities with the software (BBC BASIC)…”. The BBC Micro did indeed use the 6502 processor - an eight-bit processor which only directly deals with numbers in the range 0 to 255. Having written at least three emulators and a number of floating point and integer maths packages for the 6502 I’m fairly intimate with its inner workings and the means by which greater arithmetic range and precision is synthesised from those eight-bit chunks.
Graham’s explanation of the reason why line numbers larger than 32,767 constitute a “Syntax Error” is completely accurate. I’m sure that between us we could provide your readers with many other similarly scintillating snippets over the coming weeks.
Presumably in order to secure an audience for this bravura display of BBC Micro trivia knowledge Graham presents his elaboration as a correction: “It’s not quite right to say, as Andy Armstrong does, that the BBC Micro used 32 bit integer variables”. I’m afraid it is precisely right to say just that. Every BBC Micro (apart perhaps from a few custom built systems) was supplied with BBC BASIC as the default programming language. BBC BASIC was an integral component of the BBC Micro and BBC BASIC - rather daringly - used 32 bit integers. Jones’ original article quite reasonably conflates the ideas of the BBC Micro and BBC BASIC as would all but the most desperate pedant.
One imagines that faced with the assertion that he was using his computer to send an email Graham would respond “Oh, no - you are quite mistaken! I am, in fact, using an email program that is running on my computer to send an email; the computer itself has no inherent email-sending capability”.
Wouldn’t it be terrible if the enduring legacy of the BBC Micro was an entire generation of nerds who confuse terminological precision for effective communication?
To that I’d just like to add that it’s a damn good job that somebody still cares about this stuff otherwise, well, who knows where we’d be? Apropos of which if anyone would like to have a debate about the relative merits of the 6502 and the Z80 I’m there - but I’d just like to start by saying that if you believe the Z80 was superior to the 6502 (hah! snort!) then you’re going down baby - down where the fishes don’t sing.