BBC BASIC (Z80): v2.x versus v3.x

Here you can talk about anything related to BBC BASIC, not covered in another category

BBC BASIC (Z80): v2.x versus v3.x

Post by RichardRussell »

A question has been asked at the Stardot forum about why BBC BASIC(Z80) v3.x is a little slower than v2.x.

I think the main reason is because the Arithmetic Package (FPP.MAC) had been hived off, so that it could be used independently of BASIC in the Cambridge Computer (Sinclair) Z88. In v3 all calls to the FPP are made via a trampoline, which adds an execution time overhead; in v2 they are made directly.

To preserve the v2 speed I would have needed to maintain two separate versions ongoing: one using the separate FPP for the Z88 and one with the FPP integrated with the BASIC interpreter for the rest. I can't remember whether I ever considered that, but I doubt it.

So blame Clive and the Z88 for the small speed reduction, but it was a major coup to get BBC BASIC incorporated in that machine and for its arithmetic package to be used for the Pipedream spreadsheet calculations. There are some Z88 enthusiasts still using the machine today.

Posts: 5
Joined: Wed 30 Dec 2020, 03:00

Re: BBC BASIC (Z80): v2.x versus v3.x

Post by PDP8 »

Interesting! But first of all, thank you for the many ports of BBC-Basic!

Although I haven't done this lately, years ago I vaguely remember doing this nutty task:

Run BBC-Basic (Z80) under Simeon Cran's myZ80 emulator on my X86 pc.

Inside DOSBOX. Inside Linux as the mothership of it all. And it worked!

Of course moving bbcbasic files through/to the emulators was loads of fun. :) Since I had no remaining CP/M programs to run from the old days, and just pip-ing files was boring, I had to get something to run.

If one can get hold of Simeon's myZ80 emulator, it's a fun rainy-day task. And I believe I *still* had to slow it down, or it ran inappropriately fast anyway...

Seriously though, thanks for the ports these years. I've truly enjoyed them, and still do.

Posts: 4
Joined: Fri 11 May 2018, 21:17

Re: BBC BASIC (Z80): v2.x versus v3.x

Post by scruss »

I'm not sure if Richard's around on this forum any more, so he might not see your thanks.

If you do want to run CP/M under Linux, there are much easier ways of doing it than dosbox.
  • jhallen / cpm — turns your console into a CP/M terminal. You can even run it as a wrapper to make CP/M commands appear as if they were Linux commands
  • cpmsim from Z80pack
  • SimH has an Altair emulator