Search found 934 matches

by Richard Russell
Fri Nov 15, 2019 9:31 am
Forum: programming
Topic: Equb equw equd etc
Replies: 6
Views: 140

Re: Equb equw equd etc

I don't think BASIC 2 supports comma. If you try it then BASIC will only emit one byte. beebasm I think does support commas. I don't know about BASIC 3 and BASIC 4. JGH or someone else will know. I don't know about those BASICs either, but none of mine (Z80, 8086, x86-32, x86-64, ARM) supports a co...
by Richard Russell
Thu Nov 14, 2019 12:50 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

Hadn't seen that syntax before As far as I know it was in ARM BBC BASIC (BASIC V) from the very start, 35 years ago or thereabouts. Just one of the many 'whole array' operations supported by BBC BASIC. I remember wanting to implement a 'shift register' in an array (whereby each element is shifted a...
by Richard Russell
Thu Nov 14, 2019 9:26 am
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

So whereas we might print what day it is using something like: DIM Day$(7) FOR A=1TO7 READ Day$(A) NEXT ... DATA Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday In BBC BASIC V and later I would be more inclined to do this rather than use READ/DATA: DIM Day$(7) Day$() = "","Monday","Tuesday...
by Richard Russell
Tue Nov 12, 2019 7:52 pm
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 298

Re: Uses of the semicolon in BBC BASIC

Depending on the library... I'm so glad that I work only with Operating Systems (Windows, Linux, MacOS, Android, iOS) in which BBC BASIC's SYS statement calls exactly the same API functions, in the same libraries, and with the same ABI, as a C program would. It makes life easier for a BASIC program...
by Richard Russell
Tue Nov 12, 2019 1:53 pm
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 298

Re: Uses of the semicolon in BBC BASIC

I don't know if RISC OS SWIs generally returned any kind of meaningful output in the flags, but one special case is of "X" SWIs, e.g. "XOS_File", which used the V flag to denote an error condition instead of actually generating an error. I know nothing about RISC OS, but I would have expected that ...
by Richard Russell
Tue Nov 12, 2019 9:24 am
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 298

Re: Uses of the semicolon in BBC BASIC

Supress the absence of a question mark in INPUT. Simply an alternative to a comma, I think; not sure why semicolon is accepted here at all. Collect flags from SYS call: SYS call[,in[,in...]] [TO [out[,out...]] [; flags]] That's a new one on me. I assume it's a RISC OS feature and if so it must have...
by Richard Russell
Mon Nov 11, 2019 11:31 pm
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 298

Uses of the semicolon in BBC BASIC

I'm posting this for no other reason than that it interests me. I'm strange like that. :wink: BBC BASIC uses the semicolon character (;) in several different ways, but they all* come under the general category of 'suppress forthcoming action'. Here are the ones that I know about: Suppress right-just...
by Richard Russell
Mon Nov 11, 2019 3:53 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

unless it's impossible to use the LIST token in a program line; as a command it's limited to immediate mode only and thus likely removed from BBCSDL. As you surmise, LIST has been removed as a keyword from BBCSDL (and its original 8-bit token of &C9 reallocated to WHEN). From time to time somebody ...
by Richard Russell
Sun Nov 10, 2019 3:34 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

There's no need to introduce any new reserved words if you just extend the parser to accept constructs such as: FOR J% = 2, 3, 5, 7 To be pedantic BBC BASIC is interpreted and doesn't have a "parser", but I take your point. You'd have to ask the person who originally proposed the syntax what his th...
by Richard Russell
Sun Nov 10, 2019 10:16 am
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

BBC BASIC may not use IN as a reserved word... I’m sure I have seen ‘AS’ used (as a reserved word) in a BASIC somewhere... I was of course referring to BBC BASIC (more specifically BBC BASIC for Windows , BBC BASIC for SDL 2.0 and Matrix Brandy BASIC which are the only ones to which the proposed la...
by Richard Russell
Sun Nov 10, 2019 4:44 am
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

My initial preference would be to use "IN" instead of "OF"... Or maybe "FROM". They suffer from the same objection as 'AS', namely that they involve the introduction of a new keyword and hence risk breaking compatibility with existing programs. Admittedly I have added new keywords myself (EXIT and ...
by Richard Russell
Sat Nov 09, 2019 3:43 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

Someone more used to PHP or Perl might expect it to look a bit more like 10 FOR ("HELLO", "BBC", "FANS") AS WORD$ To me that feels a less comfortable 'fit' with existing BBC BASIC syntax than what the OP proposed; why should the affected variable come first in the case of the conventional FOR state...
by Richard Russell
Fri Nov 08, 2019 5:03 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Re: Proposal for BBC BASIC 'FOR lists'

Would you also support 1d array and string variables? FOR I% OF A%() NEXT FOR I% OF A$ NEXT I think my current feeling is that they can be so readily and elegantly implemented with a conventional FOR loop that the benefit wouldn't justify the complication: FOR P% = 0 TO DIM(A%(),1) I% = A%(P%) NEXT...
by Richard Russell
Fri Nov 08, 2019 10:16 am
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 23
Views: 665

Proposal for BBC BASIC 'FOR lists'

The following has appeared at the BBC BASIC forum : Would something like the following be hard to implement in BBCSDL? FOR I% OF 3, 22, -9 NEXT FOR Day$ OF "Mon", "Fri", "Sun" NEXT Just wondering as it would be so powerful to an already extremely powerful programming language. My immediate reaction ...
by Richard Russell
Mon Oct 28, 2019 12:10 am
Forum: software: other
Topic: A couple of simple Pi programs
Replies: 5
Views: 255

Re: A couple of simple Pi programs

BigEd wrote:
Sun Oct 27, 2019 7:26 pm
one day we'll run 64 bit OS on our Pi 3 and Pi 4, at which point perhaps long double becomes quad precision (probably in software.)
Wikipedia implies that, but when compiling BBC BASIC for 64-bit iOS (using Clang) I've seen no evidence that 'long double' is any different from 'double'.
by Richard Russell
Sun Oct 27, 2019 6:01 pm
Forum: software: other
Topic: A couple of simple Pi programs
Replies: 5
Views: 255

Re: A couple of simple Pi programs

Running these in BBC Basic SDL version, we can get more digits: So long as it's an x86 edition; sadly when running on ARM (e.g. on the Raspberry Pi) BBC BASIC for SDL 2.0 has only 16 or so decimal digits of precision compared with the 19 you listed. Although the old, software emulated, ARM floating...
by Richard Russell
Thu Oct 24, 2019 4:03 pm
Forum: software: other
Topic: Short and sweet prime numbers in Basic
Replies: 24
Views: 817

Re: Short and sweet prime numbers in Basic

if the I/O is important, It’s a fair and valid thing to do. I would say it depends on the kind of I/O. If it's output to the screen, for the sole benefit of a human observer, I might argue that increasing the speed above that at which somebody can read it is of no value, and should not be counted a...
by Richard Russell
Mon Oct 21, 2019 10:52 pm
Forum: software & utilities for the pc, mac or unix
Topic: BBC BASIC for SDL 2.0 version 1.07a released
Replies: 1
Views: 272

Re: BBC BASIC for SDL 2.0 version 1.07a released

Here are some screenshots of the SkyBaby 'planetarium' application featured in this release:

skybaby1.png
skybaby2.png
skybaby3.png
by Richard Russell
Sun Oct 20, 2019 3:47 pm
Forum: software & utilities for the pc, mac or unix
Topic: BBC BASIC for SDL 2.0 version 1.07a released
Replies: 1
Views: 272

BBC BASIC for SDL 2.0 version 1.07a released

Version 1.07a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS - has been released. The changes in this version are as follows: BASIC Interpreter / Run Time Engine User-defined characters may be used even if *FONT is active (impr...
by Richard Russell
Wed Oct 16, 2019 12:52 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 42014

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

dhg2 wrote:
Wed Oct 16, 2019 12:17 pm
Tested with this code:
If you want to make the choice of GCOL style automatic, Jonathan Harston's recommended test for 'my' BASICs is this:

Code: Select all

DEFPROCgcol(R%,G%,B%)
IF (INKEY-256 AND &D0)=&50 THEN
  COLOUR 2, R%,G%,B%: GCOL 2
ELSE
  GCOL R%,G%,B%
ENDIF
ENDPROC
by Richard Russell
Tue Oct 15, 2019 4:24 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 42014

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

dhg2 wrote:
Tue Oct 15, 2019 4:10 pm
I notice that if you try to draw text at the location of the graphics cursor (with VDU 5 and then PRINT), and if the current graphics colour is black, no text is drawn.
How very strange. Here's what BBC BASIC for SDL 2.0 produces:

blacktextwhitesurround.png
by Richard Russell
Mon Oct 14, 2019 1:39 pm
Forum: software: other
Topic: Calculating digits of Pi in Basic
Replies: 36
Views: 795

Re: Calculating digits of Pi in Basic

geraldholdsworth wrote:
Mon Oct 14, 2019 12:39 pm
I noticed that the first digit always seems to '0', and the decimal point is missing.
The subject line does say 'Calculating digits of Pi', not 'Calculating Pi', so omitting the decimal point and adding any number of leading zeroes is entirely consistent with that.
by Richard Russell
Mon Oct 14, 2019 11:45 am
Forum: software: other
Topic: Calculating digits of Pi in Basic
Replies: 36
Views: 795

Re: Calculating digits of Pi in Basic

BTW, my switch to indirection rather than array mightn't have helped at all As I am increasingly wanting my BBC BASIC programs to run on 64-bit platforms I am trying to change my mind-set away from thinking of indirection as a way of saving time and space to being unhelpful from a compatibility sta...
by Richard Russell
Mon Oct 14, 2019 11:03 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 42014

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

the only variables available to hold addresses/pointers are signed integers. Sorry, that was a silly thing to say because of course BBC BASIC's floating point variables can hold positive 32-bit integers over the entire &00000000 to &FFFFFFFF range. But it isn't usual to use floating-point variables...
by Richard Russell
Mon Oct 14, 2019 9:45 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 42014

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Conversely, if addresses are signed at 32-bits then you can end up with the odd situation where HIMEM < PAGE. That can't be right either. But that's always been true in BBC BASIC, in principle, since the only variables available to hold addresses/pointers are signed integers. Theoretically even Aco...
by Richard Russell
Mon Oct 14, 2019 9:21 am
Forum: software: other
Topic: Calculating digits of Pi in Basic
Replies: 36
Views: 795

Re: Calculating digits of Pi in Basic

BigEd wrote:
Mon Oct 14, 2019 8:30 am
But wait: the OS supports a printer, and control-B enables it, so how about capturing that output into a text area?
Can't you currently 'print' to a PDF and copy-and-paste the text from that?
by Richard Russell
Mon Oct 14, 2019 9:18 am
Forum: software: other
Topic: Calculating digits of Pi in Basic
Replies: 36
Views: 795

Re: Calculating digits of Pi in Basic

scruss wrote:
Mon Oct 14, 2019 12:52 am
Couldn't get it to run at all in Matrix Brandy on the same machine.
It runs fine in BBC BASIC for Windows and in BBC BASIC for SDL 2.0 (in the latter case on a 32-bit platform; the modification to use indirection rather than an array has of course broken 64-bit compatibility).
by Richard Russell
Sun Oct 13, 2019 8:06 pm
Forum: general
Topic: Remarkable videos recently posted on Youtube
Replies: 282
Views: 33283

Re: Remarkable videos recently posted on Youtube

Elminster wrote:
Sun Oct 13, 2019 5:41 pm
I am not sure there was a huge consensus though.
The only other name they came up with was David Allen, but they (rightly, I think) concluded that he would have been unlikely to attend such a 'technical' meeting.
by Richard Russell
Sun Oct 13, 2019 5:37 pm
Forum: general
Topic: Remarkable videos recently posted on Youtube
Replies: 282
Views: 33283

Re: Remarkable videos recently posted on Youtube

"Micro Men - 10th Anniversary - With Chris Curry, Steve Furber and Hermann Hauser". https://www.youtube.com/watch?v=yaonVYOTSsk So the historical record doesn't become even more muddled, can I confirm that I wasn't one of the representatives from the BBC who visited Acorn for that original demo (th...
by Richard Russell
Sun Oct 13, 2019 3:55 pm
Forum: software: other
Topic: *GRAPHICS command
Replies: 4
Views: 379

Re: *GRAPHICS command

Is it tokenised, so is it Acorn format or Russell format? It arrived with me as 'Russell' format but they had already tried running it in, and may have saved it from, BB4W. The program *LOADs some machine code (apparently) to access a serial port, which would help with CPU identification, but they ...