I Was Wrong - and I'm Glad! (See Requiscat in Pace)

A while back, I reported that MMBasic was at the end of the line. Fortunately, Peter had other ideas. The latest beta of MMBasic is at V7.00b3 and it has quite a few new features.

The one I like best is that now when you type RUN, MMBasic will compile your program to native machine language before running it the first time. Some MMBasic statements can’t be compiled and those aren’t touched. The statements that can be compiled, though, really speed up the program! There’s a small delay at the first RUN while the program is compiled but subsequent runs have no delay. All this is done in the background with nothing required of the user other than having OPTION COMPILE set on.
Well done, Peter!!!

5 Likes

Note. I think only MMBASIC running on the RP2350 (Pico 2-series) has the pre-compiling thing.

You’re quite correct. I believe most people have upgraded to a Pico 2 or Pico 2W by now. If they haven’t, they should!

2 Likes

Does it cache the compiled program in storage? (like python with __pycache__) ?

From TheBackShed post on v7.00

• Without PSRAM it is kept in a hidden area of flash straight after the program, three program sizes long. It is rewritten only when the program has changed since its last compile, so an edit-and-run costs one erase of it, as saving the program already does. This area is why the A: drive is smaller on the RP2350 builds

Only certain statements are compiled. Other remain interpreted.

Read all about this version here: TheBackShed.com - Forum

Why would I spoil my fun by swapping in a Pico 2? It’s the limited resources and features that make the PicoCalc fun.

I was late to the home computer game, but I think my first computer had a 6502 running at 1 MHz with 48K of RAM. The Pico is a monster compared to that. It has given me an excuse to finally learn assembly.

To each their own. I’ll stick with the minimalist vibe of the Pico.

Have fun.

3 Likes

True, exactly as I said. Peter is including more statements to be compiled with each revision so fewer and fewer will be left uncompiled.