Drobe :: The archives
About Drobe | Contact | RSS | Twitter | Tech docs | Downloads | BBC Micro

BBC BASIC turns 25

Published: 2nd Aug 2006, 23:49:27 | Permalink | Printable

Many happy RETURNs

BBC BASIC, the language that inspired a generation of British geeks, marked its 25th birthday earlier this week. Created in 1981 by Sophie Wilson at Acorn for the BBC Computer Literacy Project, the programming language is still built into modern versions of RISC OS, and is available on some 30 platforms in total.

BBC BASIC birthdayThe prevalence of Acorn kit in schools and nerdy households in the 1980s and early 1990s sparked a computing revolution in the UK, turning many of yesterday's geeky school kids into today's electronics and software engineers.

Ex-BBC research engineer Richard Russell, who ported the language to Microsoft Windows, said: "In the early 1980s the BBC set out to educate the public in the use of computers.

"It was soon realised that the wide variety of different machines operating systems and languages of the day would cause difficulties. The decision was made to target the educational material at a standard machine running a standard language, thus the BBC Microcomputer and BBC BASIC were born.

"BBC BASIC was designed to be simple enough for the complete beginner yet powerful enough to meet the needs of the most sophisticated and complex programs.

"That is as true today as it was 25 years ago, with extensions to the language having made it even more powerful without sacrificing its fundamental simplicity. No other programming language covers such a wide range of abilities and applications."

AdvantageSix, who manufacture the A9 range of RISC OS computers, believe Acorn's BASIC is versatile enough to be used as a rapid application development language.

Ad6's Matt Edgar said: "Having a simple yet powerful programming language which could also be used as a pretty decent macro-assembler available out of the box on all Acorn machines was probably a big influence on many RISC OS programmers. It's certainly where I started."


BBC BASIC birthday An interview with Sophie Wilson

Previous: Iyonix banned by new EU green law
Next: Sibelius flogged to US software giant


Viewing threaded comments | View comments unthreaded, listed by date | Skip to the end

There was an article in PC Pro recently about BBC Basic, which, of course, failed to mention Archimedes, RISC OS, BASIC V.

 is a RISC OS Userbobloblaw on 3/8/06 12:26AM
[ Reply | Permalink | Report ]

That's because it seemed to be more interested in promoting Richard Russell's BBC BASIC for Window$. I also note that no mention was made of Sophie's original name and hence where the last 5 bytes of the BBC BASIC ROM came from.

 is a RISC OS Usermfraser on 3/8/06 6:46AM
[ Reply | Permalink | Report ]

Lets not forget that Microsoft BASIC is the only peice of software Bill Gates has ever written, and when the BBC Micro project started it was consider to be so poor that BBC BASIC was comissioned instead. The PC world might like to try to re-write history and ignore where BBC BASIC came from, but its still being used today, 25 years later - when was the last time anyone saw MS Basic?

 is a RISC OS Userdruck on 3/8/06 9:50AM
[ Reply | Permalink | Report ]

Bill also wrote DOS. :-) If you call buying and changing CP/M oh and then there was VisiCalc to excel. Oh and getting win from the graphics of Apple Lisa.........

Not a lot of coding but a masterclass in business. Credit where it is due. :-)

Cheers Bob

 is a RISC OS Usernijinsky on 3/8/06 10:33AM
[ Reply | Permalink | Report ]

Why is BBC BASIC for RISC OS not developed further? Why??? Some time ago I asked Sophie Wilson to do so but she wasn't interested (although I said: "it's your baby"). Is thinking about developing BBC BASIC the same as to be an idiot? Is this a kind of a foolish joke?

I have analyzed thousands of BBC BASIC programs and so I have a lot of ideas what could (and should) be done (more and better structures, more keywords, enhancements and debugging of existing keywords, more and faster math, graphics, array storing & loading, etc, etc). This would make BBC BASIC faster and easier. Programs could be made shorter and more readable. My wishlist is very, very long! It would be also very helpful if the authors of BBC BASIC would create an exhaustive documentation of BBC BASIC's source code and its internal working.

I'm not a programmer for ARM processors, I can't program using the BBC BASIC inline assembler, and, of course, I don't have the BBC BASIC source code to enhance BBC BASIC for myself. But I like to use BBC BASIC (I love it) and this was the only reason to buy an A3010 first and later a RiscPC. I'm willing not only to pay for a much better version of BBC BASIC, I would also donate some money (say, 1000 UKP) for developing BBC BASIC substantially further to a state-of-the-art.

Why doesn't Castle give this job to someone who is interested and able to enhance BBC BASIC? Castle could personalize each copy of the new BBC BASIC module using, i.e., the RiscPC's ID-number or the MAC-adress of the IYONIX to make some money. And it would make sense to develop further the ABC compiler so that it is capable to compile the new BBC BASIC version.

BTW, on request, 1 year ago I typed in the complete original documentation of the ABC compiler, because Jack Lillingston told me that the electronic version of this documentation was lost. But it was never put on Castle's website or offered as a booklet for money. I really did enjoy to help the users of BBC BASIC and ABC in my spare time, but now I'm dissapointed and frustrated. Nevertheless, I'm further willing to help.

To come to an end: Please, remember that BBC BASIC is still a living language, and a language will (and must) change when used by its users. I don't want so see BBC BASIC like Latin: old, static and somewhat dead.

 is a RISC OS UserGollum on 3/8/06 10:43AM
[ Reply | Permalink | Report ]

mfraser wrote: "I also note that no mention was made of Sophie's original name"

I believe that it would have been wrong to have quoted her original name. I dont think that it would have improved the article in any way.

Those of us who have come through those gender related issues prefer to leave the past in the past. I know Sophie is open about her past, as am I. Hovever there comes a time when its best to just leave it be. If someone had published my birth name, I would have been very unimpressed.

Geting back on Subject - Happy birthday BBC BASIC - I love it!!


 is a RISC OS Useracornnutcase on 3/8/06 11:05AM
[ Reply | Permalink | Report ]

"Bill gates wrote DOS" I was always lead to believe that Microsoft bought DOS from another company!

 is a RISC OS Userchrisevans on 3/8/06 11:33AM
[ Reply | Permalink | Report ]

> Why doesn't Castle give this job to someone who is interested and able to enhance BBC BASIC?

Because there are *far* more important things for programmers to spend their time on for this platform?

 is a RISC OS Usermoss on 3/8/06 12:02PM
[ Reply | Permalink | Report ]

In reply to moss:

Don't be arrogant, please! Do you regularily use BBC BASIC? What is important, and what is far more important? Is your opinion important? If yes, why not my opinion? Is waiting for a new Select longer than two years important? Is paying money for nothing important? How many programmers are busied with important things? Do they get money? I would pay for BBC BASIC !

Is it, for example, important to have the CASTLE USB stack AND the SIMTEC USB stack? Is it important to have several browsers for RISC OS? Why do a lot of programmers waste their time for things which already exist? The answer is: egoism, inefficiency etc.

A lot of effort is made/wasted to achieve things on slow and limited hardware (incl. IYONIX) which will never work as on 3 or 4 GHz PCs. Viewing VIDEO-DVD in full glory , fast MP3 encoding, number crunching etc. would be very nice but seems to be (or is) impossible under RISC OS. However, writing a STAND ALONE program which, for example, will mimic the ADOBE PDF READER with ALL its capabilities with reasonable speed is important. Is there anyone around who will create such a program?

Why should be BBC BASIC (which is included with all RISC OS machines) not be important? Is BBC BASIC trash? I'm NOT the amused super trooper guy in heaven who is looking down to those idiots which want to use BBC BASIC in a sensible manner.

I think I'm not alone.

 is a RISC OS UserGollum on 3/8/06 1:00PM
[ Reply | Permalink | Report ]

In reply to Chris evans.

MS did indeed license a product. Perhaps I should have written that the "ported" Seattle Computer Products 86-DOS which was a CPM clone to the IBM machines after DR knocked back IBM or IBM< knocked back DR.

Cheers Bob

 is a RISC OS Usernijinsky on 3/8/06 1:11PM
[ Reply | Permalink | Report ]

PS Bill's mom knew a top IBM oficial (through United Way AFAIK) and did the introduction.

Cheers Bob

 is a RISC OS Usernijinsky on 3/8/06 1:13PM
[ Reply | Permalink | Report ]

in reply to druck:

"when was the last time anyone saw MS Basic?" Well I agree I don't remember but perhaps this is due to the availability of alternatives like VBScript which is pretty powerful and e.g. makes working with all files in some directory very simple since it has the functions to work on all files in a directory built-in.

As for BBC Basic in RISC OS: It's is useful but lacks some features (unless you start using the odd add-on library or AppBasic), still has no debugger (VBScript has one), is very limiting on strings (which was ok as long as file names were limited to 10 chars) just to name a few. Thus it could indeed use the odd enhancement.

 is a RISC OS Userhzn on 3/8/06 3:16PM
[ Reply | Permalink | Report ]

There is certainly room for improving BBC BASIC, when you compare it to more modern languages - but is it worth it when we already have those more modern languages running on our computers?

BBC BASIC filled a very important niche by sitting in 16K of ROM and using very little RAM. BBC BASIC V gave the hobbyists a good reason to migrate over to the Archimedes. You could extend BASIC to give it all the features of Python, or Perl or Ruby - but what would be the point? The nice thing about BBC BASIC is that it, along with Obey files, make the scripting glue to write boot scripts, and to run programs. Have significantly different versions floating around, and it's a recipe for trouble.

Simply: if you want something that'll run everywhere, use BASIC V. If you want to write in something more powerful, use a more powerful language. Most of your users will be able to install the language so they can run your program.

 is a RISC OS Userninja on 3/8/06 6:20PM
[ Reply | Permalink | Report ]

Gollum: There are better languages than BBC BASIC for developing software in - to get BBC BASIC up to a level that would rival C/C++, Java or even Perl would require a **lot** of development effort, and even after that effort, it would remain a minority language because these others already exist, and there is a **large** user base for all of them. (Note that I'm thinking language features such as Object Orientated as well as libraries).

Could you say /why/ BBC BASIC is so great and why it's imperative for it to be developed further? I can't think of that many reasons why you can't use one of the above languages instead of BBC BASIC - the only one I can think of is the size of the BASIC interpreter (which you'd be increasing by adding new features), and the size of the BASIC files (which in this day and age don't mean anything).

Sure, C/C++/Java would require more learning, but Perl isn't too far from BASIC (in fact, it's not too far from C either).

The only time I use BBC BASIC is when I want to calculate tables such as sin/cos tables for games - if I wasn't doing it on RISC OS, I would choose Perl instead (the RISC OS Perl interpreter is just too slow for my liking).

 is a RISC OS Usertribbles2 on 3/8/06 6:47PM
[ Reply | Permalink | Report ]

In reply to tribbles2:

That's the point, I don't want to learn a new language and not to learn a new grammar/syntax. As an BBC BASIC user I want to learn new powerful BASIC keywords and a few new clever rules to speed up BBC BASIC and to simplify my programming. BBC BASIC is like a house, I want some new rooms to be added. I didn't learn any other "language" than BBC BASIC, SuperBASIC (very nice) of the Sinclair QL, BETA BASIC for ZX Spectrum etc.

When I read comments of "specialists" I often think they are writing only for specialists (I'm not one). And I think they don't like BASIC, they often hate BASIC (but I don't hate specialists). I'm sure that there are many people around who still would program in BBC BASIC. because they are only capable to program in BBC BASIC. Today its not a problem to have much RAM, so it should not be a problem to enhance the size of the BASIC interpreter. Is this job so difficult for experienced programmers if they have the source code?

Look at the Public Domain - there are many useful programs written in BBC BASIC. Why? It's easy and quick to program in BBC BASIC, you must not be a programming/language specialist.

I don't understand why many people are so ignorant: C++, Assembler, C#, JAVA, Perl, Lua, Python etc, etc are THE tools of the good guys? However, BBC BASIC is only for simple minded people? Oh Lord!

May be other languages better for specialist, BBC BASIC is better for me and other hobbyists. BTW, CDBurn is written in ADA - very exotic today in my opinion. But would you or specialists criticise Steffen Huber?

 is a RISC OS UserGollum on 3/8/06 7:45PM
[ Reply | Permalink | Report ]

As I write BBC BASIC code every day, I suppose I should make some comments.

The outstanding features of the language are the powerful EVAL command, the ease with which strings can be manipulated, the readability of the code, the fact that it's compact enough to run faster than it should by fitting into the StrongARM's cache, and the grace with which ARM machine code can be inserted when extra speed is required.

As a developer, I've greatly appreciated that code I originally wote on an A5000, transfered without needing modification first to the RiscPC 6 & 700s, then StrongArm, then Omega, Iyonix and A9. My MathMagical software now contains a BBC Basic RunImage file that is 1,061,956 bytes (surely one of the biggest BBC BASIC programs written ?) and I've never experienced any instability as this has steadily progressed over the last five years to its present size. (although I will eventually run out of line numbers)

Limitations ? Well, I wish it could handle complex numbers, and that EVAL could cope with having equations containing algebraic Matricies passed to it. Personally, I think the way to extend the language is via modules rather than tinker with something that has been so thoroughly debugged. Perhaps it is a shame that no widely accepted BBC BASIC Library has emerged as a standard for this language similar to that which C programmers enjoy.

 is a RISC OS Usermartin on 3/8/06 8:15PM
[ Reply | Permalink | Report ]

Gollum: I can understand familiarity - it's one of the reasons why I'm still developing for RISC OS.

However, there was a time (about 1992) when I jumped from BBC BASIC to C for developing applications, and, after some initial problems, it's now far easier for me to use C instead of BASIC for WIMP applications (with the exception of !WindowRd - which was designed to be **very** small). Why is it easier? To me, it's a combination of library support plus being closer to the way the machine works internally (C has been described as the poor man's assembler).

Yes, BASIC is an easy language to learn ("B" = "Beginners"), and I appreciate that. Yes, you may consider me to be a "specialist", and I probably am - but I do know from experience that often the right tool for the job is not necessarily the one you have in your tool box; I wouldn't consider writing a USB driver in Perl any more than I would consider writing a log file analyser in assembler. I'd use BASIC where I thought it was appropriate.

I have thought myself about writing a BBC BASIC interpreter in C - the work to do this is pretty large, and that's before you even start looking at adding things like object orientated elements (this is [to me] fairly important in being able to write maintainable and understandable code) and external library support (it would be nice to use non-BASIC libraries in the same way that modules are used). As a result, I decided to write games instead.

In addition, while I was writing software for the Beeb, I did write an extension to BASIC, which allowed, among other things, 3D plot functions ("PPLOT N, X, Y, Z"). It was never released because shortly afterwards I got my A410/1.

The other thing is that even with source code, it's very difficult to understand how someone's written code, so there is a large amount of work required to just get it to the same level, and then you have to work out how to hook in your extensions in a way that doesn't cause problems with the existing code. I know from experience that Sophie's code is /very/ well written, and uses a lot of tricks to keep the size down and the speed up. Untangling this would be complicated to say the least.

"...you must not be a programming/language specialist." - I'll let that one slip :)

I wouldn't criticise Steffen in any way - as long as it gets the job done, then that's the main thing. Nor would I criticise someone who used BBC BASIC for their application (after all, HForm is written in BBC BASIC, and that works fine [for me]). As long as they're happy with it, and it doesn't fall over every time you use it, then that's cool.

Perhaps Drobe could have a poll as to what language people write their applications in? Or if they'd be willing to pay to have BBC BASIC upgraded with new features (and then a sub-poll of what features to add in).

Realistically, I think the only way that BBC BASIC could be improved cheaply is if the current copyright holder (whoever that is) allows the source code to be freely available, and also have some centrally managed system for feature additions (otherwise you'd end up with "BOB's BASIC" and "JIM's BASIC" which would be incompatible with each other - we've already seen things like that...). Then, you'd be able to get people who can tinker with it to tinker with it and extend it.

Can I just ask one more question? Why do you think that BBC BASIC has not been extended since BASIC V?

 is a RISC OS Usertribbles2 on 3/8/06 8:37PM
[ Reply | Permalink | Report ]

Language wars are futile. Different languages are suitable for different things. I am glad to see that lots of people are passionate about Basic, because there are a lot of things it is good for. There is one improvement which would get my vote as the most useful: the possibility of declaring functions and variables local to a Basic library (like 'static' in C). I do not think Martin need worry about line numbers in Basic. Set them all to zero, and unless your program uses them (shudder!) your program should run just as well.

 is a RISC OS UserGavinWraith on 3/8/06 8:50PM
[ Reply | Permalink | Report ]

GavinWraith: You're right.

If I was to extend BBC BASIC, I'd do:

1) Remove line numbers and use labels instead

2) Add in support for objects (which would allow Martin's complex number handling), as well as things like hashtables

3) Call non-BASIC libraries with ease (so you can use someone's C library without requiring it to be wrapped in a module of some sort)

4) try ... catch error handling

 is a RISC OS Usertribbles2 on 3/8/06 8:59PM
[ Reply | Permalink | Report ]

Just thinking about it, try...catch can already be done in a similar way with ON ERROR LOCAL (if my memory serves me right).

 is a RISC OS Usertribbles2 on 3/8/06 10:33PM
[ Reply | Permalink | Report ]

In reply to tribbles2, Martin and Gavin:

Thanky you very much. This is a friendly way of talking about BBC BASIC.

In reply to tribbles2:

1. "Why do you think that BBC BASIC has not been extended since BASIC V?"

I don't know, but perhaps nobody asked ACORN. And if someone has asked, it could be very possible that ACORN wasn't interested, unfortunately. And I don't forget that BBC BASIC V was fantastic when it came out to the world and offered a lot in relation to the existing CPUs.

When I started using BBC BASIC I hadn't Internet access to talk with other people or to send e-mails to ACORN. When I bought my A3010 I was simply happy to have BBC BASIC V. I started to think about BBC BASIC enhancements when I bought my RiscPC but even then I didn't have Internet Access. Now I believe that Michail Gorbatchew is right: Someone coming to late is punished by life. Sorry for my bad English.

2. You are right: If BBC BASIC is open source than it MUST be avoided that it ends up with "BOB's BASIC" and "JIM's BASIC" which would be incompatible with each other. A centrally managed system for feature additions is essential.

In reply to Martin:

I agree, one item on my wishlist (since a long time) are complex numbers. If I would have a BBC BASIC version which includes all my wishes than I'm convinced it would be a pleasure for me to show you that your MathMagical software can fly.

 is a RISC OS UserGollum on 3/8/06 11:06PM
[ Reply | Permalink | Report ]

There was a "RogerBASIC" that I ended up with a copy of - Sophie extended it to have a built-in MANDELBROT function - something like C = MANDELBROT(X, Y, MAX)...

 is a RISC OS Usertribbles2 on 3/8/06 11:21PM
[ Reply | Permalink | Report ]

BASIC on the Iyonix has had a small number of enhancements and bug fixes added which are documented at;


I've avoided using them where they would scupper backwards compatability with the RiscPC or sideways compatability with the Omega and A9.

 is a RISC OS Usermartin on 3/8/06 11:37PM
[ Reply | Permalink | Report ]

"Remove line numbers and use labels instead"......

Clearly written by somebody who does not write in BBC BASIC properly. There is no need for any line number OR labels even in its current form.

Point of order here. Almost all languages have a "GOTO" somewhere its just that the advocates of those languages don't like to mention it (or more likely skipped the manual where its described !)

 is a RISC OS Usermripley on 4/8/06 12:28AM
[ Reply | Permalink | Report ]

As a professional software engineer I can't remember the last time I used GOTO (or its equivalent). Probably sometime in the early 1980s. The problem with GOTO is that it can lead to "spaghetti code" that is very difficult for the reader to understand, and therefore to maintain and modify in the future, especially if someone other than the original author needs to do it or you havent loked at it for a few years. One of the problems with simple versions of BASIC (like the original Snclair BASIC) is that it is hard to avoid GOTOs because of the limitations of the language, but with BASIC V or even the original BBC BASIC there is no excuse. So I tend to take issue with the argument that any code that works reliably is good. It is possible to write a program that wors well, but whose source is very difficult to understand, and full of traps for the unwary programmer who tries to modify it. I would not describe that as "good code". Good code in by book is easy to understand, and avoids using clever tricks that can cuase much brain ache for the poor person who has to try to understand them. The only valid justification for such things has gone now that we don't need to cram our programs into inadequate amounts of memory.

 is a RISC OS Usermrtd on 4/8/06 9:50AM
[ Reply | Permalink | Report ]

I am fully aware of the "goto considered evil" aspects - but don't forget that line numbers are also used when using DATA statements - you may want to be able to do a RESTORE <label> so you can read from wherever you want to.

I don't think I've used GOTO for well over 15 years, and GOSUB for 20. (I have used a goto in C, but that was as a "finally"-type condition, which is one of the generally accepted exceptions).

But to that extent, I don't recall using RESTORE <n> before either :) (Which doesn't mean to say that it should be removed - I've not used "LET" in BBC BASIC either).

 is a RISC OS Usertribbles2 on 4/8/06 9:53AM
[ Reply | Permalink | Report ]

I have to say I have fond memories of BBC Basic. BASIC V I thought was brilliant, especially all the extra RISC OS related commands such as SYS_OS SpriteOp, you had the makings of a game development environment already built in.

My brother was extremely good with BASIC V, and made some pretty good games with it, which are on my website, such as Cavern Duel, and the just released Tank Duel - 10 years old, and recently unearthed. I'm trying to debug it using Red Squirrel :-)

The collision detection in Tank Duel is a bit wonky, but the fact that you could create such games, and take advantage of the ARM's speed, meant you could create good games, if executed well.

Every language has its place, and its the right of the individual to determine which would fulfil their needs. I wished I could learn ARM programming, but tell me, how and where could I learn it now? ARM assembler for Dummies anyone?

 is a RISC OS Usersascott on 4/8/06 9:59AM
[ Reply | Permalink | Report ]

I think anyone taking on BASIC now would have a big task on their hands. The ARM version was written back in the late 80s, when the ARM was being developed and BASIC was based on the 6502 BBC BASIC from the Master. That code is now almost 20 years old, and I'm sure it contains some clever code in it, remember it was written when the ARM was new, and the developers were still "finding their feet" with the CPU.. Not much has been changed since - the only change I can think of is BASIC64 (to use the floating point hardware/emulator). There have certainly been no major structuaral changes, which is what people are wanting.

If you want a better BASIC, I think you'd be better writing one from scratch, maybe make it able to read standard BASIC programs and convert them to its own format if necessary. You'd need to compile the BASIC if you wanted to release it, or have a runtime library module. I'd keep a BBC BASIC like core, with structural enhancements, and a way to add in extra functionality (such as toolbox library) as additions. Something semi like Visual Basic / C#.

A new BASIC for RISC OS would be a good idea, but I don't think building it on top of the BASIC V code is the way to go.

 is a RISC OS Usercmj on 4/8/06 11:07AM
[ Reply | Permalink | Report ]

The talk of "re-writing" Basic seems to have forgotten that this has already been done. I.e. Brandy, which is available for modification if you're brave enough.

 is a RISC OS UserIvanDobski on 4/8/06 11:41AM
[ Reply | Permalink | Report ]

I'm sure there is an online ARM code tutorial and didn't Ray Favre write a book that is still available?

 is a RISC OS UserAW on 4/8/06 12:05PM
[ Reply | Permalink | Report ]

Great isnt it! When I started out with computers I learned Basic as part of the first computer course; that was theory. Real programming began on the Acorn Electron and ever since I used it for many purposes. I have used it on MS-DOS computers which menat I could develop something on my trusted Acorn (Archimedes 310 and after that the A5000 and Risc PC) and really run it commercially on an IBM. I am very glad that there is a Microsoft Windows version, I did not know that but I ordered a copy for private use today! Personally I don't think we need much more functionalities, but I seem to remember that there was a complete book on the BBC-Basic ROM for those who want to develop it further!

 is a RISC OS UserHenkJan on 4/8/06 12:06PM
[ Reply | Permalink | Report ]

There's no doubt that every language has its place. BASIC is impressive in that it can be used both easily and for quite complex tasks (given that it allows complete access to the OS). When at work, writing a short graphical program in BASIC to do a particular task will often be quicker than the time it would take to open up Visual Studio.

As for the development of BBC BASIC, presumably it is still continuing, but now done by Richard Russell for Windows (linked from the article), and possibly Brandy?


I remember playing the games on your website a while back; lots of fun and frustration!

As for learning ARM assembly language, Peter Cockerall's book is the classic, and available online:


You could also take a look at Richard Murray's site which I think is also very good and has a lot more RISC OS specific material (like how to use it from BASIC):


 is a RISC OS Userflypig on 4/8/06 12:12PM
[ Reply | Permalink | Report ]

HenkJan: I used that book to extend BBC BASIC. It was a very very interesting read.

 is a RISC OS Usertribbles2 on 04/08/06 1:46PM
[ Reply | Permalink | Report ]

Would a book about the 6502 BBC Basic really be useful for extending the current versions?

 is a RISC OS UserIvanDobski on 05/08/06 10:03AM
[ Reply | Permalink | Report ]

In reply to flypig:

Thanks for the comments and link suggestions! I'll take a look with interest :-)

 is a RISC OS Usersascott on 05/08/06 3:25PM
[ Reply | Permalink | Report ]

With respect to improving/updating Basic, I dont think its very likely that the source would be released into the public domain. However, do people think that a kind of preprocessor approach might work? By this, I mean adding in some feature (e.g. OO) and then code using this is run through a program which converts it into Basic V compatible code which is then run. Of course its not ideal, but id of thought it would allow for some improvement in the language - especially seeing that assembly can be mixed in with Basic.

 is a RISC OS Userpolas on 07/08/06 12:36AM
[ Reply | Permalink | Report ]

Utterly pointless. You'd end up with a bigger bodge than the CFront C++ compiler that generates intermediate C code - which got dropped as soon as native C++ compilers were developed everywhere except in Acorn C/C++.

If RISC OS BBC BASIC is never likely to be extended as there is no viable case for it, as its not used by the OS developers for any serious application. There are two other implementations of BASIC, the cross platform Brandy which could be extended, and BASIC for Windows which already has such extentions and could be ported back. However I doubt there would be any commerical reason, who is going to pay to get a few enhancements to a proprietary language, that still has issues of scalability and maintainability?

Learning how to design good OO programs is a far bigger task than learning the syntax differences of a new language, so why stick with the limitations of BASIC (in any form, BBC or VB) when a little extra effort can gain you a useful new skill, which is also transferable to all other plaforms.

 is a RISC OS Userdruck on 07/08/06 1:49PM
[ Reply | Permalink | Report ]

Druck, I do agree partly with the approach of "well, just learn another language" however, as has been highlighted earlier in this thread, there are a number of users out there who really do not want to. As you have pointed out there are probably not enough dedicated users to warrant commercial work, but one of these enthusiasts somewhere might wish to have a go at extending the language for themselves, and if so, what would their best option be?

 is a RISC OS Userpolas on 07/08/06 1:55PM
[ Reply | Permalink | Report ]

It seems that developers can only see the point of BBC BASIC for their own purposes, however I bought an A3010 originally precisely for its BASIC facilities as I had previously struggled with a TI99! It should not be underestimated how useful this easy programming language is for off the cuff engineering calculations. I managed to use it for any number of electronic calculations that culminated in a Nodal Admittance Circuit Analyser that uses matrices and complex numbers. So even that is possible.

The only downside is that such calculations are relatively slow but are acceptable for the special advantages of using a dedicated application which can be fine tuned quickly. Of course, a compiled C program can be much faster but that is not the point. It is the achievement of getting such an important answer for a complex design problem from such a humble instrument and I found it invaluable. I still use a RISC PC, but my days in the lab are long gone.


 is a RISC OS Useremf on 08/08/06 1:46PM
[ Reply | Permalink | Report ]

No one is saying the BBC BASIC is no longer useful, or shouldn't be used. Its still great for what it was designed for; quick and easy development of relatively small programs, with simple interfacing with the filing system, command line, VDU graphics and sound system. I've written thousands of BBC BASIC programs to explore algorithms, and they run just as well inside my Graphics TaskWindows on the desktop as they did when I first started on a BBC Micro.

What BASIC isn't so suitable for is modern Wimp applications, as its lacking features such as structured data types to pass blocks to SWIs, flexible memory handling, and object orientation. The question then is it worth trying to add these to BBC BASIC and still being left with a interpreted proprietary langauge, or is it a better for the BASIC programmer to bite the bullet move to a standard language which incorporate all these things, has the benefits of a vast range of libraries available, and is a useful transferable skill.

 is a RISC OS Userdruck on 08/08/06 3:43PM
[ Reply | Permalink | Report ]

I hope you'll forgive an interjection from the Windows world ("Get out of here!" they all cried).

Whilst I'm not stupid enough to claim that I've enhanced BBC BASIC for Windows to a degree that it is competitive with C++ or Java, I have added features that make it a half-decent language in which to write large, complex applications. Most important among these are proper data structures and the PRIVATE keyword (the latter acting like LOCAL but with the values preserved from one call of a PROC/FN to the next). These don't amount to full 'object orientation' but they do go a long way towards allowing proper encapsulation of related data and code. I've also implemented function and procedure pointers, and some people are attempting to emulate something like a class/method system by storing FN/PROC pointers in a structure along with the related data.

Other features that I've added to BBC BASIC for Windows are byte (8-bit) variables and arrays, variable pointers and long (up to 65535 character) strings - a feature that it shares with Brandy. The byte variables were essential to allow arbitrary structures to be created, especially for passing to the Windows API. For example Windows still uses some 16-bit values and these can be emulated using a sub-structure like {l&,h&} where l& and h& are 1-byte members. Structures also demanded a line-continuation character so one can lay-out and document a structure over several lines (there is a BBC BASIC for Windows plugin available for the Windows APIViewer which automatically generates API structure declarations).

Because the Windows API is implemented as DLLs (Dynamic Link Libraries) the SYS statement provides a generalised DLL interface. As a fantastically useful side-effect this means that you can use SYS to access virtually *any* DLL, so interfacing BBC BASIC with 3rd party products is very easy. These can be maths libraries, video capture, 3D rendering, you name it.

I am a fairly competent C programmer and I can write Windows applications in C (BBC BASIC for Windows is written that way, apart from the interpreter which is in assembler) but I never do now. Although I don't advocate trial-and-error programming, the immediacy of being able to click on the Run button and see your Windows program running outweighs (for me) what residual disadvantages there are from programming in BASIC. And it's so nice to be able to use real strings!

I know this has been irrelevant to many people on this forum, and I apologise for whetting your appetite for BBC BASIC features which (very unfortunately) will probably never be available for RISC OS. Those of you who (dare I suggest) occasionally do - or at least might - use Windows PCs would I'm sure find BBC BASIC for Windows a friendly wrapper around an intimidating OS, and might even encourage a bit of dabbling.


 is a RISC OS Userrtrussell on 08/08/06 6:16PM
[ Reply | Permalink | Report ]

I don't really think extending BBC BASIC is worth it, as you lose the ability to run the programs on all RISC OS machines. This woul dnot be too bad if you could provide a free downlosdable version, but that would have copyright issues.

IF I were to extend it, I would add garbage collection and record types as first priorities. But, overall, I think making a new language from scratch would be a better solution -- you don't get the problems you have with languages that have had features bolted on them in several stages. You still have the problem of making it runnable on all ROS platforms, though, but you can avoid the copyright issues. A soft-loadable module containing just the execution engine would be enough for most users, while developers would also want a (simple) development environment.

As for what such a language would look like, I would avoid object-oriented langauges -- OO is one of the major reasons programmers can't program anymore and why programs that would take up a few kilobytes 10 years ago now take megabytes.

 is a RISC OS Usertorbenm on 14/08/06 12:06AM
[ Reply | Permalink | Report ]

A decent OO structured program is harder to produce than any procedural version. And there's no reason OO-edness means more memory, the things you mention like garbage collection add overhead, not objects.

 is a RISC OS UserJaffa on 14/08/06 1:03PM
[ Reply | Permalink | Report ]


I think this is a slightly contentious point. There does seem to be some evidence that OO programs have a larger overhead than procedural. The following (2002) paper looks at C vs C++ on the ARM 7: [link]

In short, it concludes (for embedded systems) that "OOP can result in a significant increase of both execution time and power consumption...data abstraction can lead to a large code size increase resulting in a significantly higher power consumption of the instruction memory."

There may also be evidence in the other direction as well? Having said all of this, presumably most people consider the modularity advantages of OOP to far outweigh any of this.

 is a RISC OS Userflypig on 14/08/06 3:57PM
[ Reply | Permalink | Report ]

Please login before posting a comment. Use the form on the right to do so or create a free account.

Search the archives

Today's featured article

  • Drobe price comparison chart
    Checking out the competition
     21 comments, latest by govind on 14/11/03 2:15PM. Published: 9 Nov 2003

  • Random article

  • Qercus says sorry for lateness
    New issue's in the post [Updated]
     43 comments, latest by JGZimmerle on 21/02/05 01:10AM. Published: 16 Feb 2005

  • Useful links

    News and media:

    Top developers:
    RISCOS LtdRISC OS OpenMW SoftwareR-CompAdvantage SixVirtualAcorn

    CJE MicrosAPDLCastlea4X-AmpleLiquid SiliconWebmonster


    RISCOS.org.ukRISCOS.orgRISCOS.infoFilebaseChris Why's Acorn/RISC OS collectionNetSurf

    Non-RISC OS:
    The RegisterThe InquirerApple InsiderBBC NewsSky NewsGoogle Newsxkcddiodesign

    © 1999-2009 The Drobe Team. Some rights reserved, click here for more information
    Powered by MiniDrobeCMS, based on J4U | Statistics
    "Drobe's only failing is the sixth-form geek-journo tone with its lead balloon humour and occasional smugness and ugly personalty"
    Page generated in 0.6046 seconds.