From Wikipedia, the free encyclopedia
Jump to: navigation, search

Developed when?[edit]

when and where was basic language developed —Preceding unsigned comment added by (talk) 16:41, 2 August 2005 (UTC)


Was there some BCPL influence on BBC Basic? For example the unparenthesized DIM and ! operator mimic BCPL vector notation. And Acorn also implemented a version of BCPL meaning that Acorn employees were aware of, and probably used BCPL. (Note also that the OS calls OSWRCH and OSRDCH correspond to the BCPL function names WRCH and RDCH - exactly the same abbreviation.)

Yes. BCPL was the primary teaching language of the Cambridge University Computer Science courses at the time. I was taught to program in BCPL by Martin Richards - who invented it, and it undoubtedly was a major influence on the developments at Acorn. The use of "!" for instance as mentioned, but also the BBC's OS has definate parallels with the BCPL global vector.
Acornsoft published a BCPL compiler/runtime system for the BBC. This was written by John Richards (Martin's brother) and Chris Jobson, and I had the task of project managing it through to publication. It was one of the first group of "other" programming languages which we produced for the BBC. (talk) 01:09, 19 December 2011 (UTC)Paul Fellows, Acornsoft Languages Group Leader


iirc there was a version of BBC basic supplied on disk with the master that ran from the 32K of main memory and used the 64K of sideways ram to store the basic program. I think it was called BAS128 but i've never actually seen it running.

Yes there was. It was an idea cooked up by myself when the BBC Model B+ was being launched. The relocation of the interpreter code into main memory, and use of the 4 x 16K of sideways ram banks gave a full 64K of free memory available for the user's program. It was slightly slower as a result of the need to deal with the bank-switching, but the difference was small. Tony Thompson of AcornSoft did the work taking the assembler source and modifiying it. It was shipped on disc with all BBC B+ systems as I recall. (talk) 01:01, 19 December 2011 (UTC) Paul Fellows, Acornsoft Languages group leader


Did the ENVELOPE command really do nothing? I certainly used it (although 14 parameters were a bit of a challenge). —The preceding unsigned comment was added by (talkcontribs).

It only says it did nothing from bbc basic V (archimedes basic) onwards. You probably used it in older versions. Plugwash 16:10, 18 August 2006 (UTC)
ENVELOPE changed the sound envelope on the BBC computers. Archimedes used a totally different sound system, so envelope was silently ignored (no pun intended) to retain backwards compatibility with old BBC machines. Kim Bruning 21:42, 18 August 2006 (UTC)
No. Technically ENVELOPE has always done exactly the same thing in all Acorn OS hosted BBC Basics – it calls OS_Word/OSWORD 8. Whether the host OS (or any module) does anything as a result isn’t really BASIC’s responsibility. It is certainly possible for ENVELOPE to do something under Arthur or RISC OS. nemo (talk) 12:04, 14 April 2011 (UTC)


The maximum line length in BBC BASIC was 255 characters (IIRC, give or take). This combined with the fact that multiple commands could be combined onto a single program line gave rise to a very popular programming challenge: the "one liner". Quite simply the challenge was to write a program which dumbfounds the observer who could not believe that something so useful or visually impressive could be achieved in such an impossibly small amount of code.--Ear1grey 02:33, 15 December 2006 (UTC)

  • 255 characters including the line number, line length, and terminating CR, so 251 characters. — Preceding unsigned comment added by (talk) 18:43, 23 May 2016 (UTC)

Xtreme BASIC program storage abuse[edit]

Or, an insightful guide to the BASIC interpreter.
You could do really loopy things with BASIC. There were two limits. The OS line editor call had a 255-character limit, but BASIC stored tokenised code not plain text. BASIC's limit was 255 characters of tokenised data. First and foremost, you could enter all the BASIC commands abbreviated; when you LISTed the lines, they would expand from the tokens back out to more than 255 characters.
You could omit spaces in weird places; "IFA ANDB" would succeed if (A & B). As soon as I and F were parsed, "IF" was assumed and 'A' was considered a variable. Ditto the AND. Variables cannot start with BASIC keywords (as per the User Guide), allowing for short-circuit parsing of "IF" in "IFA". "LET IFA=1" will be treated not as creating IFA and setting it to 1, but as "LET IF A=1", resulting in "Syntax error".
The tokens themselves were nothing more than extended ASCII characters, which could be inserted by pressing the red function keys. For example, the token for AND was 128, or shift-ƒ0. Thus, you can write "IFA<shift-ƒ0>B". BASIC will list this as "IFAANDB" which is normally invalid ("No such variable", referring to "AANDB") but owing to direct insertion of a token, will run in this instance. With judicious use of the red function keys, abbeviations and omitted spaces, you can create lines of code that are far too long, or simply too invalid to re-enter.
A note on verifiability: all above examples were fully tested just now on an Issue 4 BBC Microcomputer, Acorn MOS 1.20, BBC BASIC 2.
Ghiraddje 13:42, 17 July 2007 (UTC)


Mark Plumbleys BASIC book has a nice understandable diagram of the operation of BBC BASIC (i.e. evaluation engine), would it be appropriate to include it on the page?

Wow, a fascinating book, I just found a copy of it on the BBC Documentation Project. To include that diagram in Wikipedia, though, you'd need to get permission from the original author. The diagram would count as copyrighted material, and I'm not sure that you could claim that fair use applies in this situation. Cmdrjameson 11:42, 20 April 2007 (UTC)

I've added the diagram but tell me if it meshes ok with the rest of the article.


I can't be certain enough to edit the article, but didn't the B+ use BASIC II? The article almost implies as much, since it says the only different in BASIC III was in the US version, so the UK B+ version would effectively have had basic II.-- (talk) 22:37, 20 June 2008 (UTC)

  • Yes, the BBC B+ came with 6502 BASIC II, identical to the BBC B. Some 6502 second processors were supplied with HiBASIC III which only had a few differences from BASIC II. — Preceding unsigned comment added by (talk) 18:41, 23 May 2016 (UTC)


Surely we can get a better image than the About box from an application running on Windows. BBC Basic was developed for the BBC originally, I would like to see some Basic code being displayed on a BBC micro. What do you think? Darrenaustralia (talk) 08:57, 9 January 2009 (UTC)

Not sure if my micro still works, but I do have an emulator on my PC that looks like the original. I guess I could take a screenshot of a very simple program running? Let me know... —Preceding unsigned comment added by (talk) 14:42, 31 May 2010 (UTC)
Agree The original image was introduced 3 years ago and has now been replaced with what should be considered to be a more appropriate one. -- Trevj (talk) 21:17, 5 December 2011 (UTC)

Acorn Archimedes (RISC OS) - 'Main article' link[edit]

The section BBC BASIC#Acorn Archimedes (RISC OS) links to Acorn Archimedes by using{{Main|Acorn Archimedes}}. Would it be more appropriate to use {{Main|RISC OS}}? --trevj (talk) 09:53, 29 March 2011 (UTC)

 Done Understood to be uncontentious --Trevj (talk) 13:42, 11 May 2011 (UTC)

BBC BASIC on the QL?[edit]

I've added a citation request on this, because I don't believe this to be correct. The Sinclair QL uses SuperBASIC, which I'm fairly certain was written in house from scratch. Perhaps this is being confused with the Sinclair Z88 which used a BBC BASIC dialect? — Preceding unsigned comment added by WikiPhu (talkcontribs) 13:10, 9 March 2012 (UTC)

I've removed the sentence because I believe you're right about the Z88 confusion. And the Z88 is already mentioned elsewhere in the article. I found no refs supporting the BBC BASIC on QL, but found references (not reliable sources but never mind) which support your belief: [1], [2], [3]. There's no mention at Sinclair QL or SuperBASIC either, which I think there would be if true. -- Trevj (talk) 15:09, 9 March 2012 (UTC)

Archimedes Basic Compiler[edit]

Someone has added a "citation needed" in respect of the comment about the Archimedes Basic Compiler. I am not sure how to cite something's but there are a number of references out there, including a PDF Of the reference manual which can be downloaded

The compiler was written by myself, Paul Fellows, originally published by DABS Press, and later taken over by Oak Solutions Ltd, and then finally transferred to Castle technology, where some improvements were made by Alan Glover.

There is also an "original research" tag on the part that says, that the compiler was distributed as self-compiled code. This is correct, The Compiler was written in BBC basic. This could be run under the basic V interpreter, and other programs could then be compiled to object code. Eventually the compiler became competent enough that it could be used to read a copy of itself in, and put out object code which, when run, would also function as a compiler. This was a great day, because the speed improvement was very substantial. The first successful run took 28 hours under the interpreter. The object code version could do the job of compiling the compiler from source in 1 hour. I never had to go back.

This ability to self-compile was a testament to the degree of compatibility between the interpreter and compiler. There were a few differences, such and EVAL, and the behaviour of dynamic free variables, but if these were avoided, then all was good. An interesting point here was also that the code-generation was done using the in-line assembler [ ] notation, which meant that the compiler had to be able to deal with this in exactly the same way as the interpreter.

Perhaps someone can advise me as to what to do to add these footnotes to the BBC Basic story, following the citation and original research rules?

I have attempted to paste in URLs to refer to sources on this, but am using an iPad, and it wont accept it. Perhaps I am doing something wrong?

Paul Fellows, ( Acornsoft Languages Group Leader, and author of ABC ), Cambridge. — Preceding unsigned comment added by (talk) 00:11, 13 December 2012 (UTC)

Archimedes - Helix Basic[edit]

Not sure if it's worth adding a few words on Phil Kent's Helix Basic variant, as it attempted to add a GUI / GUI builder that sort of aped Visual Basic? (talk) 01:25, 23 September 2015 (UTC)

OSBYTE 0, INKEY-256[edit]

OSBYTE and INKEY tell you nothing about what BASIC is running, they tell you what the host /operating system/ is. You could be running Z80 BBC BASIC 3.00 and INKEY-256 return 'BBC B+'. You could be running 6502 BBC BASIC IV and INKEY-256 return 'RISC OS'. — Preceding unsigned comment added by (talk) 18:31, 23 May 2016 (UTC)

Very valid point. There is no simple way of telling one BASIC from another, though since the MOS and RISC OS (through all of Acorn's history) were supplied either on EPROM or ROM, one may make assumptions based upon the operating system version. It isn't foolproof, as you point out.
I have also added information of how to tell HIBASIC apart from BASIC when running on the second processor; and also how to tell BASIC64 from BASIC when running on RISC OS.
To go any deeper, in the case of RISC OS (as BASIC has had various important syntax changes in its life - full RGB colours for RISC OS 3.5+, plus COLOUR OF x ON y for RISC OS 5.? to give two examples that come immediately to mind), it will be necessary to guess based upon the operating system version and the module build date. BASIC on RISC OS does not provide an API level indication, and the copyright string - even today - says "(C) Acorn 1989".
Frankly, I wonder if version detection info should even be in Wiki at all - it could quickly turn into an unholy mess. 20:26, 21 September 2016 (UTC) — Preceding unsigned comment added by (talk)

Addtion of port to RM Nimbus platform[edit]

There should be an addition to the section on ports to other platforms to include the version what Wilson wrote to run on RM Nimbus PC (186 machines) which was later also ported to run on the PC compatable 286/386 M and X series machines using the RM Nimbus PC Sub bios emulator for the 286/286 machines BBCload BBCBasic and BBCLoadR being the programes to call on a Nimbus PC to imitate BBC basic.