ElliSoft
Menu
  • Home
  • Retro Computing
  • Micro Fiction
  • Flash Fiction
  • Geocaching
  • Geocache Stats
  • Genealogy
Menu

The Blitz

Posted on 12 June 2024 by Jon

I’ve been meaning to really seriously start learning assembly on real hardware for, well, since I was 15 really, but if I am honest I really struggle – not enough time to dedicate to it I think (that’s my excuse), and I always fall back to the CBM Basic I learned as a kid. 

So I’ve been looking for a halfway house to tide me over until such time as I am proficient enough in assembly (that day will come – never say never!)

My main project at the moment is a C64 text adventure to accompany a book I am writing. I am in the parser phase, creating an effiicent way to parse instructions and return meaningful actions, and I think I can get a decent parser done in Basic. It’s just sloooow.

Enter Blitz! – Blitz promises to compile basic to run faster. And it does. There are a number of compilers out there, all with their own limitations and quirks it seems, and I am not going to try all of them today – but the other one in the mix which is considered one of the best is Basic Boss. Great name 🙂

First of all a quick benchmark program to test the compilers. I wrote a small routine to calculate prime numbers between 1 and 1000 – probably a more efficient way to do it but that isn’t the point. As long as we’re comparing eggs with eggs.

In CBM BASIC, as it comes, the sequence of 1 – 1000 completed in 8 minutes 56 seconds.

Standard CBM Basic

Blitz! loads up from disk and asks a question around setup – dual or single floppy.

At this stage make sure your disk containing a copy of your program is mounted. Blitz asks for a file name immediately after selecting 1 (single floppy) and you simply type the name of your PRG file (minus extension). The compiler then makes a couple of passes of the code and compiles to two file. IN my case PRIME compiled to C/PRIME and Z/PRIME – C/PRIME being the one you load and run.

So the moment of truth, loading and running C/PRIME shaved 3 minutes 12 seconds off the time, repeatable on each run.

Blitz Basic

Coming in at 5 minutes 44 seconds – I was reasonably impressed with that, but obviously need to do some more testing on more complex BASIC code with my text parser to get a really good idea of speed gained.

Basic Boss is lauded as the best compiler out there, but it came in at 6 minutes 03 seconds, so behind Blitz by 19 seconds – again, more testing required and I suspect results may differ on larger programs.

Basic Boss

Basic Boss too is very easy to use and is basically the same operation as Blitz. Mount your disk, pass it the filename and compile. It compiles to +PRIME (adding a plus sign to the front) and is a single file. It reportedly compiles to pure ML which is why I suspect it may perform better on larger, complex programs than Blitz but we will see.

I’ll update with some parser benchmarks once I am ready to do some testing but for now, I am optimistic that at least one on these compilers will speed up BASIC text adventures to a point where they are playable. If I have time I’ll maybe repeat this excercise over the weekend on BASIC 64, Diablo and Laser, another three compilers worth trying out.

As an aside, I’m also looking at using the Infocom library for 8-bits, PunyInform, but I don’t want to come out of the C64 bubble and work on modern hardware. I’m odd.

By the way, all software and info can be found here.

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on X (Opens in new window)
  • Click to share on Mastodon (Opens in new window)
  • Click to share on Bluesky (Opens in new window)
Category: Retro Computing

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • October 2024
  • August 2024
  • June 2024
  • June 2023
  • April 2023
  • Does Every Family Have One?
  • I’m going to be rich, rich I tell you!
  • All Around The Wold
  • Advent of Code 2023 Day 1
  • Advent of Code Prep – 2023
Goodreads: Book reviews, recommendations, and discussion

Jon's books

Men Without Women
liked it
Men Without Women
by Haruki Murakami
Prophet Song
it was ok
Prophet Song
by Paul Lynch
This is the first Booker winner I couldn’t get on with. The writing style annoyed me. I found it a hard slog to get through which isn’t what I generally look for in a book. Anyway, not for me, and if we all liked the same books what a bo...
Three Men in a Boat
Three Men in a Boat
by Jerome K. Jerome
Naked Lunch
Naked Lunch
by William S. Burroughs
Three at the Angel
Three at the Angel
by Maurice Procter

goodreads.com
Follow me on Mastodon
Mastodon
© 2024 ElliSoft | Powered by Minimalist Blog WordPress Theme