Our friend Robin at 8-Bit Show And Tell lets us know of this cool and free Commodore 64 BASIC 2.0 extension, of a sort, called Hare Basic. It’s a successor to an earlier version called Bunny Basic. Here’s the video, 48 minutes long. My comments on it follow below, which you can read either after having watched the video, or before, depending on of you have most of an hour to spare right now.
Here are the downloads, which are hosted on the creator’s Dropbox, so availability may fluctuate.
Commodore BASIC is, in many ways, the worst of all worlds. It’s a slow interpreted language, a variant of infamous Microsoft BASIC, and it has almost no machine-specific features, but it comes with the machine, and it’s burned into ROM. You can swap it out for extra RAM if you have a replacement OS or are running something in pure machine code.
I could go on for a long time about the problems with Commodore BASIC 2.0, a language I’m quite familiar with having spent much of my teens programming in it. Sometimes it feels like it was designed especially to run slowly. One example: it supports floating point math, which ordinarily would be a good thing, right? Use integer math for performance, and just use floats when you need decimals, right? But no: internally, Commodore BASIC converts integer variables into floats when doing any math with them, and converts them back to store as integers when it’s done. Wilberforce Trafalgar Franklin?! Why?! It does these unnecessary extra steps to do all arithmetic as floating point even when it doesn’t need do, and doesn’t offer a way to do performant integer math at all! Need I remind you that Microsoft BASIC is based upon software written by Bill Gates himself? I suspect that I don’t!
Hare Basic is a highly optimized subset of Commodore BASIC that can be switched on and off as needed. It has to be coded in a special way which might throw beginners for a loop: Hare Basic can’t abide whitespace, for example, only allows for variables of one letter in length, has no support for modifying strings, and contrary to Commodore BASIC can only do integer math. There’s lots of other differences too, and if you want to play around with it it’s essential that you study the manual.
But once you get used to it, it runs blazingly fast, sometimes as much as 10 times faster! And the best part is you don’t have to use it for everything. You can start out with a standard Commodore BASIC program, then enter into Hare Basic mode with a USR function call. You could write your whole program in Hare if you’re up for it, or just loops, or other places where performance is necessary.
Of course, this is ultimately an enhancement for a programming language that runs on a home computer made in 1984. It’s not what one might consider of universal interest. But it might be of interest to the kinds of people who read this site. It’s interesting to me, at least. Maybe I should dust off VICE and see what I can do with it? I haven’t coded on a ’64 in nearly three decades, maybe I should get back into that….
Subscribe to get Set Side B content via email.
Set Side B will never share or use your email address for any purpose except delivering our posts.