Talk:BBC BASIC
This is the talk page for discussing improvements to the BBC BASIC article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is written in British English, which has its own spelling conventions (colour, travelled, centre, defence, artefact, analyse) and some terms that are used in it may be different or absent from other varieties of English. According to the relevant style guide, this should not be changed without broad consensus. |
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||
|
Developed when?
[edit]when and where was basic language developed —Preceding unsigned comment added by 202.176.233.36 (talk) 16:41, 2 August 2005 (UTC)
BCPL
[edit]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.
- 82.21.98.46 (talk) 01:09, 19 December 2011 (UTC)Paul Fellows, Acornsoft Languages Group Leader
BAS128
[edit]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.
- 82.21.98.46 (talk) 01:01, 19 December 2011 (UTC) Paul Fellows, Acornsoft Languages group leader
ENVELOPE
[edit]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 217.30.113.248 (talk • contribs).
- 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)
- 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)
ONE LINER
[edit]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 92.234.250.60 (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)
Diagram
[edit]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.
BASIC III
[edit]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.--195.137.91.247 (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 92.234.250.60 (talk) 18:41, 23 May 2016 (UTC)
Image
[edit]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 86.160.185.61 (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 (talk • contribs) 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)
- The Z80 version was independently written by Richard T. Russell from 1983 onwards. He originally wrote it of the Z80 processor, and as it had become widely-used on various machines using the Z80, Clive Sinclair used it in his Z88 in 1987, which also used a Z80. [4] REH11 (talk) 15:51, 21 May 2019 (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
www.a4.com.de/discos_down/ABCMan_org.pdf
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.
www.drobe.co.uk/article.php?id=1428
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 82.21.98.46 (talk) 00:11, 13 December 2012 (UTC)
- If you've given a talk or interview where you say this, and have a URL for it, that's a citation. The manual can now be found at https://web.archive.org/web/20200706104519/http://www.act.pibox.de/d/riscos/down/ABC_ManOrg.pdf — Preceding unsigned comment added by 90.242.63.151 (talk) 06:44, 22 October 2021 (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? 83.104.51.74 (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 92.234.250.60 (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+, plusCOLOUR 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 90.32.162.131 (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.
- I believe that was RM BASIC, which had differences to BBC BASIC, however there could have been confusion due to it using a charecter set which included Teletext graphics, and thus a MODE 7 look could be emulated. REH11 (talk) 15:37, 21 May 2019 (UTC)
- In addtion to RM BASIC, BBC BASIC did ship on the Nimbus's--Flibble (talk) 12:40, 23 May 2019 (UTC)
- Indeed it did: BBC BASIC for RM Nimbus. But this wasn't a Sophie Wilson effort: it was based on Richard Russell's work, like the PC and Z80 versions. The binary contains the string '... by Richard Russell, Jeffrey Raynor and Brandon Butterworth ... (C) Copyright R.T.Russell 1985' --scruss (talk) 17:23, 28 June 2021 (UTC)
- In addtion to RM BASIC, BBC BASIC did ship on the Nimbus's--Flibble (talk) 12:40, 23 May 2019 (UTC)
- I believe that was RM BASIC, which had differences to BBC BASIC, however there could have been confusion due to it using a charecter set which included Teletext graphics, and thus a MODE 7 look could be emulated. REH11 (talk) 15:37, 21 May 2019 (UTC)
More emphasis on BBC Basic language
[edit]I was employed writing operating system components for many years and I have a personal interest in much of the detail on this page.
However I am concerned that the balance is too much towards niche system details. There is almost more on 6502 Assembler than on BBC BASIC.
While putting the full set of Keywords would turn the article into just a long list, aspects like parameter passing and local variable scope were not in other offerings of BASIC available at the time (1980s). There was a contrast between many other BASIC implementations that had only the rudimentary DEF FN and relied on GOTOs.
BBC BASIC allowed the programmer the opportunity to use meaningful variable names when some others only permitted A..Z and A1..A9 etc.
(I know that many of the monthly magazines had an interest in one line programs, but really that says nothing about BBC BASIC).
Acorn produced an implementation of BASIC that enabled structured program design. The memory limitations of the BBC Model B created problems but that was a hardware constraint, not the language itself.
(I once broke a compiler on a mainframe because it could not deal with my meaningful variable names).
The page could be improved if it started by describing the BBC BASIC language first and possibly putting topics like the the differences between individual versions (and which machine they were on) on linked pages? BlueWren0123 (talk) 20:04, 7 October 2023 (UTC)
Problems with References
[edit]The 1st External links entry is identified as "Official website". This links to the useful website created by R. T. Russell. It is not an "Official website".
Reference No 3 "Video processor for Acorn/BBC computer" is about an integrated circuit that was unsuccessful because it overheated. This has no connection with this Article.
References No 1 and No 4 are the same "BBC Micro ignites memories of revolution"
Reference No 11 "LICENSE master RiscOS / Sources / Programmer / BASIC" is a Formal Commercial License that does not contain either "BBC" or "BASIC".
Reference No 12 "Have I got old news for you" fails on Firefox & Chrome. "The Icon Bar" is not about BBC BASIC.
Reference No 16 "BBC BASIC V ..." fails on Firefox & Chrome.
Reference No 17 "Brandy Basic" links to the Raspberry Pi and MYOB. If there is any mention of BBC BASIC then it is well hidden.
Reference No 21 "Fast BASIC by Computer Concepts" is a magazine advert for an unrelated product.
I have not checked all the links / references but the list(s) seem to have been padded out with items that do not relate to this Article. BlueWren0123 (talk) 02:51, 19 October 2023 (UTC)
Remove 'Computer languages in general'
[edit]The article goes significantly off topic with this unnecessary diversion. This is all covered in https://en.wikipedia.org/wiki/History_of_programming_languages, the content of which doesn't need repeating here. This section should be deleted altogether, not shortened or anything - it just obstructs the subject of the article. ToaneeM (talk) 00:02, 31 January 2024 (UTC)
- Looked at that article. It should cover this summary but doesn't. Really it doesn't. It is disjointed and inconsistent in its approach. It reads like an essay?
- Wikipedia can have duplication where it is relevant. Should be kept instead here. Specific details may be found elsewhere (not always as here) but the reader often has to put in considerable effort to search through a collection of related articles.
- Poor choice of section heading. Will change to 'Relevant existing languages'.
- Previous editors concentrated on versions and implementation speed. I do not want to obliterate their content. FORTRAN and ALGOL are directly relevant to the language syntax. LISP is directly relevant to the implementation. Assembly language is directly relevant to the assembler (6502 or ARM) that was included within BBC BASIC. COBOL could be removed. CORAL-66 (a ALGOL derivative) had a rudimentary type of machine inclusion. In some ways BBC BASIC mimicked existing languages but it also had new approaches and this can be identified.
- Here need to establish BASIC as the language choice instead of other possibilities. Corporate entities of the time had a culture of "programming is for the professionals" (IBM was a purveyor of this). Need to substantiate 'how did we get to here' before 'where did we go next'.
- As from my proposal above in Oct 2023, change the emphasis away from discussion on 'which version do I have' to 'this is the form of the language' and 'this is what you could do with it'.
- BBC BASIC was very briefly only what the BBC wanted. As soon as Acorn got established and no longer had to comply with the (narrow) BBC specification, it became more like a ALGOL language.
- Will need to put into this article the main language constructs. They did not exist in isolation, CALL and USR() for example existed in Microsoft BASICs but the scope was different. BlueWren0123 (talk) 20:21, 31 January 2024 (UTC)
It's flatly off-topic. The article neither needs nor benefits from it. It reads like a classic case of an author enjoying writing it and not that readers need it. Renaming it does not stop it being an obstruction. It needs deleting altogether.ToaneeM (talk) 00:13, 1 February 2024 (UTC)
The BASIC that Acorn had available was crucial to the BBC choosing Acorn. Where will you put that is you just delete the section entirely? Where did Microsoft BASIC come from and why was that so important to the BBC. Without that Acorn would not have become established as it did. Without Acorn becoming prominent there would have been no BBC BASIC. This is crucial to the notability of BBC BASIC. how do you intend to fill the gap in information if the section disappears. What is your improvement?BlueWren0123 (talk) 02:55, 1 February 2024 (UTC)
Everything that's now been renamed 'Precursor languages' can vanish without trace. There is no loss of information without it. It's just a lengthy obstruction to getting on with the title subject. It's a very recent addition and a bad one, it brings no improvement or clarity to the article entitled 'BBC BASIC'. If readers wish to understand what went before in computing in general, they can read other articles. Again, it seems to be there because because an editor wanted to write it, not because readers would have any difficulty without it. It needs deleting altogether.ToaneeM (talk) 09:22, 1 February 2024 (UTC)