Go to advanced search

by RichardRussell
Sun Jul 14, 2019 9:23 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

Well, back in the day they were a lot faster than procedures, so maybe for speed? Or just convenience? In BBC BASIC, procedure calls (without parameters) are typically faster than GOSUB. Specifically, the destination of a procedure call is looked up in the same way as variables are, in a relatively...
by RichardRussell
Sun Jul 14, 2019 9:10 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

@ RichardRussell : I am looking at a bit of BBC BASIC code by you, and it uses GOSUB a lot, as well as GOTO. I don't understand. You quote my name, but then refer to a program using GOTO and GOSUB. I haven't used either keyword in a BBC BASIC program for at least 30 years, apart from test programs ...
by RichardRussell
Sun Jul 14, 2019 9:21 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

BBC BASIC seems more like Paul Dunning's SpecBasic. There are similarities, in that both are closely based on the BASIC that was supplied with home computers of the early 1980s (the BBC Micro in the case of BBC BASIC and the ZX Spectrum in the case of SpecBAS). Both have also been greatly extended ...
by RichardRussell
Sat Jul 13, 2019 10:07 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

For me that would be like being stuck in UltraEdit and the output window and its JavaScript embedded scripting engine is my BASIC environment. SDL was conceived as a cross-platform games engine and is still graphics-dominated, so it's hardly surprising that BBC BASIC for SDL 2.0 is first and foremo...
by RichardRussell
Sat Jul 13, 2019 8:19 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

You would probably hear less complaining about being stuck in your IDE if you gave your users a console like environment to work in. I'm not sure to whom that comment was directed, but none of my users has ever complained about being 'stuck' in the IDE (why "stuck"?). Most of them are past (or curr...
by RichardRussell
Sat Jul 13, 2019 5:38 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

DavidS wrote:
Sat Jul 13, 2019 4:07 pm
The only question is does the assembler in your BBC BASIC recognize the SWI instruction?
I've checked, it does (but only with a numeric parameter of course):

Code: Select all

0043184C EF000003             swi 3
by RichardRussell
Sat Jul 13, 2019 4:27 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

You need to be able to use the libraries before you can call a function in them, so you need to link them in at run time In the case of the C Run Time it's not an issue, because the ARM edition of BBC BASIC for SDL 2.0 is written in C! Indeed it's precisely for this reason that calling CRT function...
by RichardRussell
Sat Jul 13, 2019 1:17 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

No idea. You will have to ask DavidS about that. I'm sure he will explain how it would be smaller, faster and more portable... He'll probably say that printf is not available under RISC OS (and as a user of that OS, portability isn't a major concern)! I'll continue to discourage, and not provide sp...
by RichardRussell
Sat Jul 13, 2019 12:47 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

Nothing stops a user from using kernel calls directly for doing things he has permission to do. OK, but why would one choose to write out the text using a kernel call rather than, say, printf in the CRT? printf is much more portable: it works on every OS that BBC BASIC for SDL 2.0 will run on I thi...
by RichardRussell
Sat Jul 13, 2019 11:52 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

Is using SWI 0 with R7 having the call number still allowable for Linux System Calls from the assembler in you BBC BASIC? My understanding is that SWIs are kernel calls in Linux and therefore not usable from user-mode code; is that not right? Certainly I've made no specific provision for them, I'm ...
by RichardRussell
Sat Jul 13, 2019 9:10 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

It sounds like I should have no trouble using the BBC BASIC assembler on your implementation. There's an assembler 'Hello world!' program supplied with BBCSDL which should give you an idea of whether it will be suitable. Apart from the selection of appropriate source code for the CPU (64-bit x86, 3...
by RichardRussell
Fri Jul 12, 2019 4:01 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

As I understand the challenge it is to write an editor that actually uses the Window Manager that is native to the desktop Operating System John said that my native BBC BASIC program appears to meet the terms of the challenge, so that is apparently not the case. What subset of the ARM AARCH32 ISA d...
by RichardRussell
Fri Jul 12, 2019 3:44 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

It's just that when someone uses the word "language" to refer to the programming language and the run-time environment it operates in and all the features that implementation provides via modules/extensions whatever, then they start to fall into that generalization. It's all in the context. If you ...
by RichardRussell
Fri Jul 12, 2019 2:56 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

I don't want to pick on you in particularly but this kind of statement drive me crazy. Sorry, but you are missing the point. The whole purpose of a challenge, surely, is to be able to make some judgement about the strengths and weaknesses of one language compared with another. An excellent example ...
by RichardRussell
Fri Jul 12, 2019 12:00 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

The goal is to show how desktop GUI is done. The editor challenge is just the stage for that goal. You can do whatever you like with my program (SDLIDE.bbc) and the associated library (dlglib.bbc). Both are written entirely in BBC BASIC and there is no reliance on any external GUI library, framewor...
by RichardRussell
Thu Jul 11, 2019 7:13 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

Could it be used to edit non-BBC BASIC? The syntax colouring and indentation are BBC BASIC-specific, of course, and there is a line-length limit of about 250 characters. Apart from that it will probably be OK with source code for a different BASIC (e.g. ScriptBasic), you did ask for a 'code editor'...
by RichardRussell
Thu Jul 11, 2019 5:37 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

Any chance the both of you could collaborate on a submission? If you are happy to accept an existing program, rather than something written specifically for the challenge, then my SDLIDE.bbc meets the requirements as I understand them: Menu: YES Toolbar: YES Rich Text edit control: Not Rich Text bu...
by RichardRussell
Thu Jul 11, 2019 4:49 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

I mean, what is a window? It's a region of memory that you draw to. The only OS-dependent code would be getting and displaying that surface and BBC BASIC uses SDL2 for that, I'd imagine. Everything else such as mouse movement/clicks, keyboard usage should be exposed to the user in any decent BASIC....
by RichardRussell
Thu Jul 11, 2019 4:37 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

How do I do that? How do I create a window, handle menus, handle Window Manager events, handle messages, etc in a way that is OS independant without using libraries, while maintaining compatibility with RISC OS? By doing everything in BASIC! BBC BASIC is more than capable of implementing the full s...
by RichardRussell
Thu Jul 11, 2019 8:38 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

And the reason I am hesitant to make a submission, as I would be using native code and doing so in BBC BASIC V on RISC OS. Unless you want to use embedded assembler code, it ought to be relatively easy to write it in 'generic' BBC BASIC so that it will run in BBC BASIC for Windows , BBC BASIC for S...
by RichardRussell
Wed Jul 10, 2019 10:31 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

After all, the spirit of the challenge is to actually show how the language's code looks, how readable it is, etc. True, but the opportunity for showcasing a language's 'unique' features is limited if you are constrained by the interface imposed by GMP. I reckon the BBC BASIC Fibo program is quite ...
by RichardRussell
Wed Jul 10, 2019 6:47 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

ScriptBasic and I had a disagreement about this. But I decided that if a big integer module was created for ScriptBasic and included in the standard install, then it would qualify. No matter if it used GMP under the hood, that is an implementation detail at that point. It's that solution I was refe...
by RichardRussell
Wed Jul 10, 2019 6:05 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

I agree, otherwise one ends up with challenge entries that look like... Since you mention it, I felt that it was a flaw of the Fibonacci challenge too, as there was nothing to prevent a 'solution' consisting of calling GMP library routines. Writing a BigNum library from scratch in BBC BASIC (which ...
by RichardRussell
Wed Jul 10, 2019 4:19 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

I agree, otherwise one ends up with challenge entries that look like #!/bin/sh exec emacs "$@" Quite. It ends up being a test of how easy it is to embed a library widget, which ought either to be straightforward (if the language supports that kind of thing) or impossible (if everything is sandboxed...
by RichardRussell
Wed Jul 10, 2019 8:14 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35388

Re: Introduction to BBC BASIC

If you don't want to participate, that's fine too. The kind of challenge that would be more likely to attract a submission from me is one that specifies that only native code (including supplied standard libraries) can be used, in other words specifically excluding the use of external libraries and...

Go to advanced search