BBC BASIC Console Mode editions updated to v0.31


Hated Moron
 

I have updated the Console Mode editions of BBC BASIC to version 0.31. The changes in this version are:

  • The command line may be longer than 255 characters (this is exposed to a BASIC program in the @cmd$ variable).

  • The *KEY command now accepts leading spaces in the definition (if in quotes), as it always should have done.

  • An internal structure has been declared static to fix an unexplained incompatibility with CentOS.

  • An experimental native Mac edition for the M1 CPU ('Apple silicon') has been added (see below).
Version 0.31 may be downloaded from the usual place:

* The Mac M1 ('Apple silicon') edition does not have a usable assembler because Apple enforces the Hardened Runtime on that platform.


Hated Moron
 

On Sat, Jan 30, 2021 at 06:02 PM, Richard Russell wrote:
An experimental native Mac edition for the M1 CPU ('Apple silicon') has been added
I confess to not being an Apple fan, but there's no doubt that the M1 is an impressive CPU.  Running timing.bbc I get an average result of 96 ns on my fastest Windows PC (Intel core-i7 3.6 GHz) but 46 ns on the M1 Mac Mini!  Of course this is not an entirely fair comparison, because the floating-point calculations are using 80-bit extended precision floats on the PC but only 64-bit doubles on the M1, but nevertheless achieving approximately double the speed is quite an achievement.


Cecil Bayona
 

80-bit floats are about twice as slow as 64-bit floats.

On 2/1/21 1:01 PM, Richard Russell wrote:
On Sat, Jan 30, 2021 at 06:02 PM, Richard Russell wrote:
An experimental native Mac edition for the M1 CPU ('Apple silicon')
has been added
I confess to not being an Apple fan, but there's no doubt that the M1 is an impressive CPU.  Running *timing.bbc* I get an average result of *96 ns* on my fastest Windows PC (Intel core-i7 3.6 GHz) but *46 ns* on the M1 Mac Mini!  Of course this is not an entirely fair comparison, because the floating-point calculations are using *80-bit* extended precision floats on the PC but only *64-bit* doubles on the M1, but nevertheless achieving approximately double the speed is quite an achievement.


Hated Moron
 

On Mon, Feb 1, 2021 at 07:40 PM, Cecil Bayona wrote:
80-bit floats are about twice as slow as 64-bit floats.
80-bit floats can only be calculated by the FPU (Floating Point Unit) but 64-bit floats can be calculated either by the FPU or by (e.g.) SSE2 SIMD instructions.  That complicates any attempt to make a simple timing comparison, as does the fact that the SSE2 instructions can perform multiple 64-bit float operations at the same time (whether the compiler can take advantage of that is another matter).  So I'd prefer to say only that 80-bit floats are slower!


Storer, Darren
 

Richard,

Thanks for the updated console versions, much appreciated.

Apart from the M1 variant, which I can't run yet, all the versions work well here.

Regards

Darren


On Sat, 30 Jan 2021 at 18:03, Richard Russell <news@...> wrote:
I have updated the Console Mode editions of BBC BASIC to version 0.31. The changes in this version are:

  • The command line may be longer than 255 characters (this is exposed to a BASIC program in the @cmd$ variable).

  • The *KEY command now accepts leading spaces in the definition (if in quotes), as it always should have done.

  • An internal structure has been declared static to fix an unexplained incompatibility with CentOS.

  • An experimental native Mac edition for the M1 CPU ('Apple silicon') has been added (see below).
Version 0.31 may be downloaded from the usual place:

* The Mac M1 ('Apple silicon') edition does not have a usable assembler because Apple enforces the Hardened Runtime on that platform.


Hated Moron
 

On Wed, Feb 3, 2021 at 04:29 AM, Storer, Darren wrote:
Apart from the M1 variant, which I can't run yet
For me to have beaten you to acquiring an Apple product must be a first!  I ordered the M1 Mac Mini direct from Apple one afternoon and it was delivered the next morning, so I can't fault either the CPU or their sales process for speed!

My current intention is not even to try porting BBC BASIC for SDL 2.0 to the M1.   There are too many complications: currently neither SDL2_ttf nor SDL2_net frameworks are available for that CPU; I don't have an AArch64 assembler, and even if I did Apple's Hardened Runtime would prevent it working, so there wouldn't be a working debugger or profiler.

And anyway Rosetta is just too good: so far the x86-64 edition of BBCSDL has worked flawlessly on the M1 (including 3D and shader graphics), and I'd rather have 80-bit extended precision floats than a slightly faster native interpreter.