Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
BBC BASIC
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===BBC Micro=== {{Main|BBC Micro}} [[File:Hard reset BBC Micro 32K Acorn DFS.gif|thumb|BASIC prompt on the BBC Micro after switch-on or hard reset]] The full version list is available here:<ref>[http://mdfs.net/Software/BBCBasic/Versions BBC BASIC version list]</ref> BASIC I, the original version, was shipped on early [[BBC Micro]]s. BASIC II was used on the [[Acorn Electron]] and BBC Micros shipped after 1982, including the Model B. It added the <code>OPENUP</code> and <code>OSCLI</code> keywords, along with offset assembly and bug fixes.<ref name="homecomputeradvancedcourse52">{{ cite magazine | url=https://archive.org/details/The_Home_Computer_Advanced_Course_52/page/1037/mode/1up | title=The Old and the New | magazine=The Home Computer Advanced Course | publisher=Orbis Publishing Limited | issn=0265-2919 | date=1984 | access-date=11 May 2024 | issue=52 | pages=1037β1039 }}</ref> BASIC III was produced in both a UK version and a United States market version for Acorn's abortive attempt to enter the cross-Atlantic computer market. Apart from a few bug fixes, the only change from BASIC II was that the <code>COLOUR</code> command could also be spelled <code>COLOR</code>: regardless of which was input, the UK version always listed it as <code>COLOUR</code>, the US version as <code>COLOR</code>. The main place that BASIC III can be found is as the HI-BASIC version for the external second processor. BASIC IV, also known as CMOS BASIC, available on the [[BBC Master]] machines, was changed to use the new instructions available in the 65SC12 processor, reducing the size of the code and therefore allowing the inclusion of <code>LIST IF</code>, <code>EXT#</code> as a statement, <code>EDIT</code>, <code>TIME$</code>, <code>ON PROC</code>, | in <code>VDU</code> statements and faster floating point. Bug fixes were again included. BASIC IV (1986) was a further improvement to BASIC IV, and was included on the Master Compact machine. The version of BASIC on the Compact included re-coded mathematical routines, said to provide a 30% speed increase over the version included in the rest of the Master series.<ref name="acornuser198610a">{{cite news |url=https://archive.org/details/AcornUser051-Oct86/page/n16/mode/1up |work=Acorn User |title=Taking the lid off the Master Compact |date=October 1986 |access-date=5 September 2020 |pages=15, 17β18}}</ref> HI-BASIC was available in two versions, the first based on BASIC III, and the second based on BASIC IV. Both were built to run from a higher address (&B800) on the second processor, rather than the usual &8000 address on the BBC B. This allowed more program space to be available on either the external or internal 6502 second processors. A version was introduced to support a [[Zilog Z80]] second processor.<ref>{{cite book|title=A & B Computing|last=Smith |first=Bruce |date=November 1984 |publisher=Argus specialist Publications|location=London |page=6}}</ref> Another version of BBC BASIC, called BAS128, was supplied on tape and disc with the BBC Master and Master Compact; it loaded into main RAM and used the 64 KB of Sideways RAM for user programs. This provided support for much larger programs at the cost of being a lot slower than the normal ROM-based version. The interpreter can deal with both BASIC and 6502 assembly language, which can be included between the [ and ] characters. This contributed to the system's popularity with industrial and research engineers.<ref name="edn marsh 2005">{{cite news | url=http://www.edn.com/design/integrated-circuit-design/4325360/FROM-EDN-EUROPE-ARM-targets-automotive-and-industrial-dominance | title=ARM targets automotive and industrial dominance | work=EDN Europe | date=5 December 2005 | access-date=1 August 2012 | author=Marsh, David}}</ref> ====Further details/determining BASIC version==== {{unreferenced section|date=November 2023}} As the BBC MOS and RISC OS were usually supplied on ROM, it may be assumed that a specific release of the operating system contained a specific version of BASIC. As such, there is no simple way to determine ''which'' version of BASIC is actually running other than by enquiring the operating system identity and thus making an assumption. {{quote frame|2=BASIC ROM USER GUIDE |1=Note that all Electrons, and later BBC microcomputers, have BASIC2: the earlier BBC microcomputers have BASIC1. If you are not sure which version of BASIC is in your machine, typing REPORT after BASIC has started up (after a BREAK or *BASIC), will print the copyright message. If the date is 1981, BASIC1 is fitted; if it is 1982, you have BASIC2. American machines, or those with a second processor, may have US BASIC or HIBASIC: the ROM routines will not be in the same place for these ROMS.}} See also [http://beebwiki.mdfs.net/INKEY#Check_machine_type BeebWiki] entry for INKEY. On the BBC family, it is possible to run both the standard BASIC ''and'' an enhanced HIBASIC on the 6502 second processor. One may determine if the program is running on the second processor by examining the initial value of PAGE, it will be &800 if using the second processor. To distinguish between BASIC and HIBASIC, one should examine the initial value of HIMEM. This will be &8000 for BASIC running on the second processor, and &B800 for HIBASIC on the second processor. A similar situation exists on [[RISC OS]] where there may be the normal BASIC or BASIC64 (which offers higher precision maths). Normal BASIC identifies itself as "BASIC V" and BASIC64 identifies itself as "BASIC VI", therefore the following (used before any error has occurred) will distinguish one from the other: <syntaxhighlight lang="bbcbasic">IF INSTR(REPORT$,"VI") THEN PRINT "BASIC64" ELSE PRINT "BASIC"</syntaxhighlight> There are better ways of doing this.{{according to whom|date=November 2023}} See the [http://beebwiki.mdfs.net/What_BASIC_is_running BeebWiki]. In almost all cases you shouldn't need to be testing for what BASIC or platform your program is running on, just make the call and read whatever returned data are returned and deal with it.{{Original research inline|date=November 2023}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)