Richard Russell's BBC BASIC
Pages: 1 2
Patrick M (2888) 115 posts |
Hello, I didn’t know whether this should go in aldershot or the general forum, since it’s not really related to RISC OS. The past couple of weeks I’ve been experimenting with Richard Russell’s variant of BBC BASIC. After getting used to some of the differences, I quite like it. There are some extra features that are really handy, like LOCAL arrays for example. What do you all think about Richard Russell’s version of BBC BASIC? Patrick |
nemo (145) 2546 posts |
I’ve used it quite a bit. But only the free version because I’m cheap. It works very well. Richard’s a top bloke. Some behaviour is slightly different – COLOUR for example. I wrote a module that made RISC OS work the same way as BBfW as it happens (I can’t remember why I thought that was worthwhile). BBC Basic has had local arrays for quite a while though. Is that what you meant? |
Chris Hall (132) 3554 posts |
I think he meant volatile local arrays that evaporate when you leave the function/procedure in which they were defined.
And, yes, you are right – you can do that in RISC OS BBC BASIC as well as BB4W. |
nemo (145) 2546 posts |
BBfW has structures, which may or may not have been influenced by the design discussion Steve and I had a long time ago. I implemented structures in BBC Basic, but being limited by the lack of memory management I did not release it. Steve added a slightly different syntax to Basalt, which I think can do memory management. BBfW has
|
Steve Drain (222) 1620 posts |
He is, indeed. Can I take this opportunity to point out that he has just released versions of BBC BASIC for Android and iOS, after his earlier version for Linux on the Pi: http://www.bbcbasic.co.uk/bbcsdl/index.html. He asked me for help with an ARM assembler for use in these, but that was a bit beyond me. However, he has solved that, except that Apple restricts the used of such things. |
Steve Drain (222) 1620 posts |
I do not think Richard was influenced by us, but it was about that time he included them.
It does. Structures in Basalt and BB4W achieve largely the same ends, but differ signifcantly in syntax. Just to note, from your list, Basalt has forms of |
nemo (145) 2546 posts |
ORLY? Shame. I’d have thought that |
nemo (145) 2546 posts |
BBfW treats ‘logical colours’ as pens, in effect, so whereas I wrote a module that made RISC OS work the same way in deep colour modes (that can’t sensibly have a programmable palette). I honestly have no recollection why I thought that was worth the time. |
Steve Drain (222) 1620 posts |
Working outside BASIC itself make things tricky, and calling a Calling a When it comes to pointers, only a duplication of chunks of BASIC would may this work directly. Instead, Basalt stores a pointer to the cached data in the list, which includes the name, and then uses the name code. So you can indeed have: F%=PTR(PROCfoo) PROC(F%,<parameters>) It is not quite as fast as I would like, so this is a better option, using F%=PTR(FNfoo) FN(F%,<parameters>) |
nemo (145) 2546 posts |
I forget the constraints under which Basalt works. I was thinking of hacking Basic itself, where it would seem to be straightforward. I so want to make a version of Basic with an IDE and single-stepping/breakpoints… but I’m massively overstretched as it is. These kind of discussions always pique my interest though. Stop, Steve! |
Tristan M. (2946) 1039 posts |
Richard Russell’s website is one of the best resources for using BBC BASIC on RO, even though it’s not even quite the same product. While a version with IDE (I keep thinking like Complete BASIC on Apple IIgs) would be nice, an easily available source of documentation for the underlying language would make it far better. |
Steve Drain (222) 1620 posts |
Oh, go on. ;-)
Is the BBC BASIC Reference Manual just published by ROOL not sufficient? There is also my StrongHelp manual, although it could do with an update in light of recent developments. |
Steve Drain (222) 1620 posts |
Both DrWimp and especially AppBasic have attempted that. And who remembers Archway?
My own take on an IDE is StrongED and ResEd, with Basalt of course. ;-) If ResEd could use named events that would almost complete the the requirement. |
Alan Robertson (52) 420 posts |
a version of Basic with an IDE An IDE on any other system is something that resembles Visual Studio, or something that at least uses a splitter window to display different information such as files, properties, objects. Nothing remotely close to that on RISC OS at all. If only there was. |
Rob Andrews (112) 164 posts |
Sourcery come to mind take look the really small software company might only work with c though |
Rick Murray (539) 13840 posts |
Moreso than that (as multiple Zap|StrongEd windows can almost fake the same sort of thing) is that IDEs on other systems tend to be capable of single-stepping through the code allowing real-time evaluation of variables as you go. DDT can do this, but it’s not the most pleasant thing to use…I tend to rely upon DADebug and try to avoid DDT entirely. |
Rick Murray (539) 13840 posts |
While I’m here, a rant of my own. DDT’s crashiness and the fact that when it crashes, you cannot use it again without a full system reset. Makes it somewhat of a non-starter for many debugging jobs. Really, it would be good if DDT had an “emergency” option to permit it to be either killed (and reloaded) or used again. |
Steve Drain (222) 1620 posts |
I completely forgot to include the wonderful Reporter in my IDE. You can step through a program and report selected variable values. There are other very useful facilities. The removal of debugging lines from a program for a published version is discussed in the Help, but if you use Basalt you can access Reporter with keywords and remove debugging lines very simply. |
nemo (145) 2546 posts |
Alan said
Indeed, that is my preferred model. Unlike DDT, I envisage something that fools the BASIC program, rather than fooling the rest of the system. ie the BASIC program thinks it is doing Wimp_Poll, Wimp_Redraw etc, but it ain’t. CALL would have to be atomic, but there’s NO reason why BASIC can’t be single-stepped by a managed BASIC environment. Naturally its workspace would look like vanilla BASIC, but there’d be a Dynamic Area with the IDE-specific stuff. The IDE doesn’t have to be part of the BASIC interpreter of course, that can be delegated. We’ve all written things that spy into a BASIC program’s workspace so you can view variables live as the program runs, I presume? So it’s only really the breakpoints, single-stepping and SYS spoofing that would be new. |
nemo (145) 2546 posts |
|
Colin Ferris (399) 1814 posts |
Interesting – is ‘Basic Spy’ available for download? For the 26bit world there is !BasDT by Dick Alstein. |
nemo (145) 2546 posts |
Not at the moment. It dates back to 1993 would you believe it, though I last updated it… (checks)… yesterday. :-/ Steve and I are discussing a better method (whether he knows it or not). Oh Steve… What if Actually, I have a much better location in mind. The RMA workspace can then be shared between the debuggee BASIC instance and the debugger, being the trampoline for breakpoint lists (of all types), execution mode, execution count, BASIC’s state (LINE, stack etc), BASIC’s task handle, wimp buffer and queues. Obviously the interpreter in debugging mode can look for breakpoints on statements (LINE), Lvalues, memory locations… it might be useful to log DIMs for identification purposes. Sound flakey? It would be more robust than DDT. Significantly, even if the program was halted or went into an infinite loop, it could still be quit from the Task Manager because BASIC would be the Task, not the program. |
nemo (145) 2546 posts |
Colin teased
I have never heard of that, and it doesn’t seem to exist now. Is this something you have access to? |
Rick Murray (539) 13840 posts |
<mumbles under breath>Most things are more robust than DDT</mumbles> |
Steve Drain (222) 1620 posts |
I have a copy of version 1.10 if you cannot find it. It is ‘CareWare’, which permits distribution but limits use, and I never felt the need to use it myself. |
Pages: 1 2