Messing with cbmHandBasic for the iPad

Given that my computing devices have been somewhat restricted by the weight limit imposed by Ryanair on our trip to Portugal my Retrochallenge has been reduced to what is available for the iPad. If you search for 'Retro', 'Simulator' or 'Emulator' in the AppStore you get a variety of space-invader clones and a load of Spectrum game emulators, roughly divided into two camps: buy this game, or buy this emulator with in-app purchases. No programming allowed here!

Thank goodness then for cbmHandBasic from Hawwash-Soft. The app emulates Microsoft 6502 BASIC as supplied with the Commodore 64. The app is free to install.

cbmHandBasic Logo

It has an optional, unrequired extension to provide graphics output. Given that the app is free to download and fully functional without the extension I had no qualms forking up the £2.49 cost for the graphics extension.

Commodore BASIC programmers will be instantly at home.


LOAD “$” loads a list of demonstration programs available. The majority of these make use of the graphics extensions.

The Logitech bluetooth keyboard comes in very handy using apps like this – no on-screen keyboard means full screen real estate is dedicated to the app.

Here is the output from an example program to plot a 3D surface:

Hand Basic 3D Plot

3D Surface generated using the Hand BASIC graphic extensions

I decided to test the performance of the app. Firstly I printed out the entire character set using the CHR$() command. I noticed that at character 147 the screen was cleared. I then found out by printing lines of text to the screen that the screen is 64×35 characters. Performance is fairly limited, with about four full screen refreshes every second, and I'm not convinced given that this is a flat-out refresh rate that you would actually see the characters.

Refresh Rate Test

Test of HAND Basic performance - full 64x35 characters sent to the screen. Result - 4 frames/second

Interestingly there are PEEK and POKE commands available in the command set – I wonder what gems there are in there…

Of course talk of screen refresh rates were inspired by the excellent work going into David Moisan's HacMan. I doubt I'll be able to get anything 'fun' working in the time left, but it's kind of perverse writing CBM64 BASIC applications for an iPAD. A good kind of perverse.