May as well add the WHILE...ENDWHILE loop way of doing this in BBC BASIC
Code:REM WHILE...ENDWHILE loop BBC BASIC (BBC BASIC for Windows & BBC BASIC V) a%=0 WHILE a%<10 a%+=1 PRINT a% ENDWHILE END
May as well add the WHILE...ENDWHILE loop way of doing this in BBC BASIC
Code:REM WHILE...ENDWHILE loop BBC BASIC (BBC BASIC for Windows & BBC BASIC V) a%=0 WHILE a%<10 a%+=1 PRINT a% ENDWHILE END
However let it be said that the only correct way to program BBC BASIC today is to program it wrong.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
I confess wasn't expecting that. What paradox? The only dysfunctional thing happening here is the idea that there's any sort of reason for a legacy system to remain in in the domain of BBC BASIC and not have been ported already. Is that what you are trying to say? The language wasn't even able to sustain very large systems due to the combination of syntax and semantics that made large programming tasks overly complex and impractical. Today it remains only an historical figure and a source of curiosity, nothing more. If you know of anyone or anything maintaining some BASIC system on a need-for basis, they are idiots.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
I must confess that I wasn't expecting your overreaction to my request that you explain what you meant when you said that the only way to correctly program BBC BASIC was to do it wrong - a paradox. A quick bit of research on your part will show that in fact BBC BASIC was originally designed to teach programming but did have commercial uses. At least one modern implementation of the dialect is being used commercially today (I don't think I could describe such users as 'idiots' though), although as you rightly point out, it is small scale especially when compared to languages like C. See "Happy Birthday BBC BASIC" on this link, which will provide more information.
www.rtrussell.co.uk
For me, BBC BASIC is nothing more than an enjoyable hobby, along with pottering around with 8 bit micros like the BBC Micro and ZX Spectrum - a hobby that I understand we share
BBC Basic was fun back in the day, but I only used it generally to access the built-in assembler. Much of the code I wrote was for use on Econet or games. It was certainly easier to access the full power of the machine on a BBC than on a Sinclair, as you needed an assembler which itself took 20 minutes to load from a tape deck. Brings back memories
Couldn't recall the details, so I fired my emulator just now and the BASIC interpreter uses up roughly 20k of a 48k total available memory. A hog. The BBC implementation uses less space, but its still 16k and it has no access to graphics or sound. The BBC implementation does have a neat feature that allows you to embed assembly language into the BASIC code (which you mention) and helps bypass its limitations and actually permits BASIC code to do extravagant things not possible with just either shape of BASIC. But other than because one is pressured for time, the Z8x instruction set is so easy that it pays to just go full assembly and forget BASIC entirely.
I still do Z80 programming as an occasional hobby as part of my love for the ZXSpectrum machine, which is where I started programming. Precisely on BASIC. But I think not even a couple of years later I first started back in the early 80s, I had already moved entirely to Z80 assembly.
EDIT: I remember returning to BASIC back in the early days of DOS, namely the DOS BASIC. But that too was short-lived because soon enough first DBase and then Clipper, completely robbed the space for any interest in BASIC. I can understand the appeal as an hobby and a curiosity, that much I said before. Who doesn't have fond memory of POKEing their way through games or learning to program by copying code from the Crash or MySinclair magazines. But anecdotal evidence of the existence of modern and semi-modern implementations of BASIC code doesn't remove the fact it is a dead language. My statement a couple of posts above was evidently a joke making a stab at that fact.
EDIT 2: And one is still an idiot if they use BASIC to monitor seismic activity on the Roman Colosseum. The risks of maintaining such a system are evident for no other reason than the tremendous difficulty that it must be to guarantee the availability of programmers in case something goes wrong.
Last edited by Mario F.; 12-18-2016 at 06:45 PM.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
I started with the ZX80. Learnt BASIC very quickly but it wasn't enough. Soon picked up the z80 programmers handbook and taught myself assembly language. Trouble was the choice was a 20+ min load of an assembler from a tape or to write on paper, look up each op code and type in the numbers bit by bit, in actual fact one or two games for Sinclair machines were actually written exactly like that as computer time for some was scarce. I had a zx80 then a Spectrum 48k. School built a brand new computer labs complete with BBC 'B's, and a few Master 128k all linked with Econet. A mate also had a Beeb so I had time to learn 6502 asm before the labs were finished. The Speccy had greater capabilities for sure, but writing for the Beeb was easier. The Beeb was for sure the better built machine, they were solid, Speccys often went boom from overheating or failing components. Some games companies back then really pushed the Speccy to the limit. I always thought the best Speccy games came from Ultimate Play the Game. On the Beeb we were all playing Elite if I recall correctly, Ian Bell's and David Braben's masterpiece.
You should love this place. And its forums.
We are still a very active development community.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Along the same lines, I have seen the full source code for the !Run application of Lemmings on the old Acorn Computer - and the entire file is BBC Basic. I do not know if Psygnosis coded that entire version of the game in BBC Basic due to the speed the code ran on Acorns and the limited memory space would not have made C (which most modern versions of the game were coded in) a viable language for that platform.
Pygnosis did however, do a brilliant job with the code - and getting such a (back then) graphically enhanced version of the game to run flawless on limited hardware is full credit to them. Yes, they also created Shadow of the Beast and Agony, but neither of those games had an Acorn port (I don't think they did) due to the scale of them compared to simplicity of Lemmings.
Double Helix STL
Who doesn't remember Manic Miner or for Beeb afficionados Elite. That version of Elite is written in C reverse engineered painfully by hand from the original 6502 asm source codes. Colour has been added as the original was black and white and wireframe.
Yes Mario I am already aware of that community. It's been a long time since I used z80 or 6502 asm.
Yes I am a member of this community and it has a thriving BASIC scene - original Sinclair BASIC and extended implementations. Here are links to some of the latter:
ZXBasic - BorielWiki
pauldunn
You may also be interested in this community too:
Sinclair ZX80 / ZX81 Forums - Index page
BASIC is making a bit of a comeback as a teaching language:
Welcome - Every Child Can CodeEvery Child Can Code
and BBC Micros are being used by some schools to teach coding because you have to use more mental muscle to get results within the available memory:
http://www.tnmoc.org/explore/computing-education
I don't think people are idiots for using BBC BASIC commercially. There may be popular and more capable languages for many commercial tasks but BASIC has less overhead than many languages and its simplicity and stability are its strengths. In other words, if the language is up to the job then why not?
I'm sure that commercial users would have business continuity plans is place and it should be no problem for professional programmers to pick up and maintain well structured and documented BBC BASIC, even if they haven't cut their teeth on BASIC.
As late as 2004, a BBC Micro was still being used to steer the 42ft telescope at Jodrell Bank, which emphasises its reliability, stability and suitability for critical tasks like monitoring seismic activity on the Roman Colosseum even if there are more obvious languages out there for doing so.
Last edited by Richey; 12-19-2016 at 05:39 PM.
This is starting to sound like Haskell programmers justifying the viability of their language as well...
Okay, I tease. I don't know any BASIC. I just thought it was a funny opportunity for a joke :P
Forgive me.