Go to advanced search

by Soruk
Thu Aug 08, 2019 10:21 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1657
Views: 81311

Re: Project Digital Apocalypse Not Now

Since cream rises to the top, it's not surprising that Basic has taken over the top of the bar chart. As Basic was the language responsible for the widespread computer literacy of the golden age of personal computing, I've been looking at hanagram.bas to see if there are any obvious ways to improve...
by Soruk
Wed Jul 31, 2019 9:38 pm
Forum: Other programming languages
Topic: ARM BASIC
Replies: 1
Views: 1371

Re: ARM BASIC

There are actually two variants of ARM BBC BASIC, one is BASIC V that is part of the ROM of every RISC OS (and Arthur!) release, and this is the one described above. The other is BASIC VI, aka BASIC64, which was introduced with RISC OS 3 and a soft-load. This is identical in almost all respects exce...
by Soruk
Wed Jul 24, 2019 9:01 pm
Forum: General programming discussion
Topic: Comparing Interpreted Language Speed.
Replies: 57
Views: 6459

Re: Comparing Interpreted Language Speed.

Just stumbled on this thread - and I'm very pleasantly surprised how well Matrix Brandy is stacking up compared to the ARM assembly-coded RISC OS BASICs! Of course it will be a bit slower (and I'm certainly nothing like the genius of Sophie Wilson!!!) For BBC BASIC64 and Matrix Brandy, you can try s...
by Soruk
Mon Jul 22, 2019 8:03 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Based on the suggestion I could open the directory, I did just that in RPCEmu, and extracted the files to a directory, which I then zipped up under the host OS - so filetypes are contained as ',ffd' (for example), zipped that up and I've uploaded it at http://pegasus.matrixnetwork.co.uk/BasaltHelp-e...
by Soruk
Sat Jul 20, 2019 4:44 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Heater wrote:
Sat Jul 20, 2019 4:36 pm
PerlBASIC.

:)
On an Acorn Atom.
by Soruk
Sat Jul 20, 2019 6:27 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Are there any array size or indecie limitations with BBC BASIC / Brandy? I wouldn't use a BASIC that had a 64KB string length limitation. No limits for BBC BASIC V/VI. Only limitted by available memory. I guess technically you could not exceed 2GB arrays, though that is not much of a limit. Similar...
by Soruk
Fri Jul 19, 2019 7:22 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

2) Matrix Brandy is actually closer to BASIC VI than BASIC V !! My head is beginning to hurt, but what happens when you attempt assign the result to an integer variable: a% = -2147483647 - 2147483647 I presume that BASIC VI still sets a% to 2 in this case (if not it's less compatible with BASIC V t...
by Soruk
Fri Jul 19, 2019 4:46 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Acorn BASICs all return -4294967294, only the older Brandy BASIC (and earlier unfixed Matrix Brandy) returned 2. When you say "all" which versions do you mean precisely? My genuine BBC Master, running BASIC 4 ("(C)1984 Acorn") returns 2 , BeebEm emulating BASIC 2 ("(C)1982 Acorn") returns 2 and Red...
by Soruk
Fri Jul 19, 2019 4:21 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

No, it toggles two different code paths, one is the (corrected) original one that pulls the float from the stack, runs TOINT() (which floor()s the number, then casts it to a signed 32-bit integer) on it and pushes it to the stack as an int. The new one pulls the float from the stack, runs floor() o...
by Soruk
Fri Jul 19, 2019 3:15 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Pardon my ignorance, but did Acorn's Basics default to single or double precision floating point? I believe that all of them, with the exception of BASIC VI on RISC OS (softloaded on Archimedes and RiscPC machines) they're all single precision 40-bit. BASIC VI offered 64-bit floating point (instead...
by Soruk
Fri Jul 19, 2019 2:51 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

I've been having more thoughts about this. And, while it deviates from RISC OS (and BBC Micro) BBC BASIC, I've added a run-time switch to Matrix Brandy to enable this behaviour of allowing INT() to process a number that can't be stored in a standard 32-bit integer variable. Thanks. Naturally I thin...
by Soruk
Fri Jul 19, 2019 1:00 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Here's a simple program to try on any BASIC that has floating-point variables with 64-bits or more: a = 2^50 + 0.5 b = INT(a) PRINT a - b This should print '0.5'. If it doesn't I would say something is seriously wrong. I've been having more thoughts about this. And, while it deviates from RISC OS (...
by Soruk
Wed Jul 17, 2019 10:07 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Do we even have a Big Fibo result for Sophie's ARM BASIC yet? If one was posted it has passed me by. What modifications to the code were required to get it to run? Should I add that code to the fibo challenge repo? The same changes I made here for Matrix Brandy https://www.raspberrypi.org/forums/vi...
by Soruk
Wed Jul 17, 2019 10:29 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Wow, my humble Fibo challenge seems to have been doing a great job of shaking out the bugs in various language run-times. I hope they are all getting reported and fixed so that this has not been entirely a waste of time. As the maintainer of Matrix Brandy, I do look out for stuff like this to test ...
by Soruk
Wed Jul 17, 2019 10:15 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Don't fall into the trap of equating 'integer variable' (which is a particular data type) with 'integer' (which is a mathematical concept meaning 'whole number'). Edit : Just to prove the point (not that I was in any doubt) you can run this on the original BBC Micro: @%=10 FOR A = -4294967296 TO -4...
by Soruk
Wed Jul 17, 2019 8:25 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

RichardRussell wrote:
Wed Jul 17, 2019 8:18 am
if it supports up to 53-bit integers (as ARM BASIC 6 and Brandy do)
Unless I'm doing something wrong, they don't.
In BASIC 6 on my RiscPC (RPCEmu), I did (and got):

Code: Select all

>a%=2^32

Floating point exception: invalid operation
>_
by Soruk
Wed Jul 17, 2019 8:21 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Sinclair Spectrum BASIC (at least on the 48K) has a LN function (which uses base e) - but no LOG function.
by Soruk
Wed Jul 17, 2019 6:48 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

Would likely also work with with &FFFFFFFF, as BBC BASIC On RISC OS supports unsigned values in integers. No. The top bit is the sign. &FFFFFFFF=-1 Edit: As Richard Russell pointed out quite correctly, what I wrote is true for integer variables - and hexadecimal conversions. However, you can (using...
by Soruk
Tue Jul 16, 2019 8:49 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

ejolson wrote:
Mon Jul 15, 2019 6:38 pm

Code: Select all

$ sbrandy

Matrix Brandy BASIC V version 1.21.19 (Linux) 01 Mar 2019

Starting with 651516 bytes free

>
You might want to update - 1.21.21 is out, and the git repo has a couple of fixes arising from issues from this thread!
by Soruk
Tue Jul 16, 2019 7:58 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

This has, unsurprisingly, uncovered a bug in Matrix Brandy. Will this affect other versions of Brandy (Napoleon Brandy etc.), or is it in an area where you modified the code for Matrix? I would expect so, the same bug exists in Brandy 1.20.1 (the latest Sourceforge release), I have not tried Napole...
by Soruk
Tue Jul 16, 2019 4:58 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 579
Views: 44567

Re: Introduction to BBC BASIC

This has, unsurprisingly, uncovered a bug in Matrix Brandy. INT was accepting values that were out of range (which is not allowed on the BBC Micro nor RISC OS BBC BASIC implementations). INT was being implemented as casting the float to a 32-bit int, which happened to get the sign right and work on ...

Go to advanced search