@AppleIIBot

Send a tweet with a short program to @AppleIIBot and your program will run on an emulated Apple II computer. The bot will tweet you back with a video your program’s output!

The bot accepts programs in two languages: Applesoft BASIC, the version of BASIC that was included with the Apple II computer; and Apple Logo.

The first version of BASIC (Beginners’ All-purpose Symbolic Instruction Code) was released in 1964. Applesoft BASIC, released in 1978, added commands for using the Apple II’s graphics capabilities and other features.

To send your program to the bot, just start your code after @AppleIIBot. Remember to hit RETURN before each new line of code.

You need to use line numbers. Immediate mode is not supported. Don’t add RUN to the end, the bot takes care of that.

Caveats, Warnings, and Disclaimers

  • If the BASIC parser can’t understand something about your program (for instance, if you forget to include line numbers) it simply won’t respond. On a real Apple II, BASIC would tell you if something was amiss. On Twitter, it isn’t feasible. So if you don’t get a reply within three or four minutes, check your code a try again. Or ask for help — it is Twitter, after all.
  • The bot doesn’t support sound yet.

You can learn the fundamentals of Applesoft BASIC with Apple’s book A Touch Of Applesoft BASIC. More experienced programmers who need a refresher might want to reference the Applesoft BASIC Reference Manual.

Bracket Directives

By default, the bot starts running your program, lets it run for 3 seconds before starting to record the video. It records the video for 30 seconds. If you don’t like this standard recording behavior — for instance, if your program takes a long time to draw a fractal — you can change it with a directive at the start of your tweet.

The {B} directive tells the bot how many seconds to wait before Beginning to record. {B20} will let your program run for 20 seconds before recording begins. {B0} will start recording immediately. The maximum wait is currently 99 seconds.

The {S} directive tells the bot how many Seconds to record your program running. {S2} will will record it running for just 2 seconds. {S99} will record it for the maximum 99 seconds. If you’re going to tie up the bot for that long, make it good.

The {G} directive gives you an authentic, old-school green screen. The {A} directive gives you an authentic, old-school amber screen. Who needs all those fancy colors?

You can combine directives in one set of brackets, like this: {B30S25} or {GS5B5}

Direct questions about the bot to Kay Savetz.