Standalone Commodore BASIC on the iPhone/iPad

You might remember the hassle about the Commodore 64 emulator in the iPhone App Store about a year ago: First it was approved, but then pulled again, because it allowed access to the C64’s BASIC – general-purpose interpreters were not allowed. After Apple relaxed this restriction, BASIC was added again.

So now it fills me with joy that Ahmad Hawwash managed to get standalone Commodore BASIC into the App Store! His “Hand BASIC – CBM Flavor” is free of charge, runs on iPhone/iPod touch and iPad, and is based on pagetable.com’s Open Source cbmbasic project, a recompiled version of the original Commodore 64 binary, so the BASIC interpreter is itself not interpreted, but runs natively and at full speed, which is in the order of 500 times faster than on a C64.

“Hand BASIC” has LOAD/SAVE support and comes with several demo programs – just type LOAD"$",8 and LIST to see them and LOAD"NAME",8 and RUN to run them. Type the (nonstandard/added) HIDE keyword to hide the keyboard.

What would be very interesting now:

  • Some cool BASIC programs that run in here – games, maybe?
  • A compiler backend that produces Commodore BASIC code, so I can run any code on the iPhone through this – with a 38911 byte RAM limitation, of course. (Actually, a program is free to set the TOPMEM pointer higher, allowing up to 62 KB of RAM for code and variables.)

Any other ideas? :-)

22 thoughts on “Standalone Commodore BASIC on the iPhone/iPad”

  1. I need to find my old issues of Compute!, which had some pretty interesting games and stuff

  2. Oh, and what is missing is iTunes Document Sharing! How am I going to get listing on an off the device?

  3. There could be the odd text adventure that would work. Most BASIC games would typically poke the back- and foreground color, screen- and color memory, so if only that could be trapped and handled in the interpreter then there should be a bunch of games that would run.

  4. Wow, all those great memories of the past. How much fun did I have with the C64 back then! Castles of Dr. Creep was my all-time favorite.

  5. Many C64 games were not fully written or delivered in BASIC, but had at least some assembler routines that they were calling. Would stuff like that work on this app?

  6. oh wow, I love this! I could probably actually make use of this on the go.

    I think you should have a native loading screen on startup, so you can quickly load/run a saved program.

    a help screen would be nice, too. without seeing this post, a lot of people won’t remember how to load (or might not believe that load”$”,1 would even work here!)

  7. @TomL: Ahmad just updated it today, adding support for stopping a running program by hitting the “bullet” key on the virtual keyboard.

  8. That worked. Thanks, Michael! Now, how about special characters in quotes such as RVS ON, RVS OFF, clear screen, color changes, cursor movements, the graphics chracters, etc?

  9. I JUST TYPED IN THE ENTIRE KIDS ASSEMBLER.
    THE CURSOR KEY IE UP,DN ETC DOESNT WORK
    THE SCREEN COLORS CHANGING DOESNT WORK
    I WAS HOPING TO WRITE SOME MACHINE LANGUAGE
    BUT NOT GOING TO WORK. DAMN. THANKS FOR THE BASIC
    COULD YOU GET THE CURSOR KEYS TO WORK?

  10. Pingback: do muc in hanoi
  11. CBM Hand BASIC is a brilliant concept!

    Well done Ahmad!

    What I would really like to see is Commodore 128 BASIC 7.0 running on the iPad in 80 column mode, but the text must look pixel identical on the display to the 80 column monitor.

    Ahmad did not publish any contact info, does anyone know how to contact him?

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.