This simple introduction to AppleSoft Basic is demonstrated on my working Apple IIe from 1983. It’s meant for beginners, so it doesn’t dive deeply into any one topic.
This 30 minute video lightly covers the following topics:
numeric and string variables
moving around the text screen
common error codes
procedural programming in RAM
editing and debugging
low resolution graphics
high resolution graphics
beeps and audio
If you want to try AppleSort Basic for yourself on a Windows PC, the best Apple IIe emulator I’ve found is called AppleWin and it is located here: https://github.com/AppleWin/AppleWin
Scroll down to the bottom of the GitHub page to click on the release link to download the zip file. Admin rights are not necessary. Just unzip the file and run the executable. Then click the Disk 1 button and choose the default (master) file. Then click the Apple button to boot up!
If we type this simple 8 line Applesoft Basic program into my working Apple IIe computer, we will end up with a cool little text based arcade game! Watch the video below to see the game in action!
This small Applesoft Basic program was published in one of my Beagle Bros Apple Software Catalogs from 1987 (volume 0, number 10). This little program was credited as being submitted by Beagle Bros customer Tim Boehme, who received a box of Beagle Bros magnetic write protect tabs for his efforts!
Wow! Write protect tabs! Amazing! 🙂
Applesoft Basic is the programming language of all the early Apple computers and was provided in ROM (memory) to make it available to the user without the need for a startup disk or the need to load it into memory from a cassette tape.
Applesoft Basic was actually created by Microsoft for Apple. Hence the name. It is interpreted and not compiled, so it is not very fast. And it can throw syntax errors at runtime if it’s unable to interpret a line of code.
One sort of funny feature of Applesoft Basic is that variable names are only significant to 2 letters, although it allows more. So if you initialize a variable named “KURT” to a value of 10, you can PRINT the variable “KU” and also the variable “KURT” and also the variable “KUPP” and they will all three show a value of 10. They are all three pointing to the exact same memory location.
Here’s the source code:
10 REM "MUNCH THE SNAILS!"
20 TEXT: HOME: H = 20: PRINT CHR$ (21): POKE 35,22
30 K = PEEK (49152): ON K < 128 GOTO 40: H = H + (K = 149) - (K = 136)
40 POKE 49168,0: IF RND (1) * 10 < 1 THEN VTAB 20: HTAB RND (1) * 20 + 10: PRINT "@": GOTO 70
50 VTAB 22: HTAB RND (1) * 39 + 1: PRINT CHR$ (46)
60 IF PEEK (1535 + H) = 192 THEN S = S + 1: VTAB 5: HTAB H: PRINT "#"; CHR$ (7): VTAB 23: PRINT "MUNCHED: ";S: GOTO 80
70 VTAB 5: HTAB H: PRINT "V"
80 T = T + 1: IF S < 10 THEN 30
90 TEXT: VTAB 23: PRINT S;" SNAILS MUNCHED IN ";T;" SNAIL SECONDS.": END
Once it starts, just click on the floppy disk 1 icon and choose the master disk file that comes installed with the emulator. Then reboot with the Apple button and it will boot to Applesoft Basic. Or, you can download ROMs for various Apple games and programs from the Internet and boot those instead. It emulates the speed of the processor, so it’s a very realistic emulation of the Apple IIe. Including several monitor types to choose from.
I hope you found this post informative and/or entertaining! Thanks for your interest! And feel free to leave comments or questions below!
In a moment of creative eruption, I came up with a new set of lyrics for “The Twelve Days of Christmas” for use at my geeky work software group’s Christmas party. I created a slideshow with the new lyrics and I showed it on the projector as I led the entire group in a sing-a-long, revealing the new silly lyrics one line at a time as we all sang them. It was a lot of fun!
It was so much fun, that I thought I’d fine tune the slideshow and share it on the Internet for everyone’s enjoyment and entertainment. Feel free to share or use it to lead a sing-a-long at your own geeky software team party or meeting! It’s also funny to personalize the song for your audience. For example, I paused after singing “10 chiefs a-nagging” and pointed out that the chief in the image was Oscar, one of our favorite managers to tease.
I recently read an online article written by Jeff Atwood, a popular software & human factors blogger, titled “Crash Responsibly“. The gist of his article was basically that we as software developers need to protect the users of our software from unknown errors and even from catastrophic crashes. I agree wholeheartedly.
Everyone who writes software should make sure that their application is self-reporting of it’s own problems. Never depend on the user to tell you that your software is misbehaving. Of course, you should also have a means for the user to manually report problems, but that should be a secondary means that you find out about your software’s bugs, issues, and crashes.
Software developers should also hide the gory details of their errors from their users by default. There are always some software savvy or curious users who will want to know exactly what went wrong, but most users just want to know that something bad happened and the software developers have been notified and they are on the case and working diligently to correct it. There should probably be a means for the savvy or curious user to see more details and also a means for the user to report the problem, but again, these are both secondary. The primary error screen should be simple and easily understandable by the general public and no gory implementation details nor debugging details should be exposed to the user by default.
I performed a search on the blockbuster.com site just now for VeggieTales movies to add to my online Blockbuster queue, when I received the following error screen:
Wow. I’m a full time software designer and I don’t think I can fully understand what this error message is trying to tell the user. I understand the “no server available” and the “timed out after 10 seconds” parts, but I’ll admit I had to look up the word “idempotent”. That’s not a word your typical user needs to be exposed to. Most users will probably even laugh at you when they see this error message because it looks like you completely made up a word.
As a software programmer, I feel the need to make the user happy so that they will like my product. We all just want to be loved, right? In order to make the user of my software happy, the user interface must not be annoying and the whole user experience must be positive. I personally have lots of opinions about what should and should not be done in a user interface, and I’m sure the whole world will not be totally in agreement with all of my opinions, and that’s fine. We can agree to disagree.
But one thing that I think is a bad idea is to pop up a dialog to the user that asks them if they are sure, without giving them any more information.
On an Internet Forum that I’m a member of we use the very popular forum software phpBB. And this evening I kept seeing this same “blind” confirmation dialog over and over again as I was making various unrelated configuration changes to my account profile. If something is worthy of an “are you sure you want to do this” type of dialog, then surely telling the user what they are about to do and why it could be bad is also worthy of mentioning? When I try to close Word without saving my document, it doesn’t just say “Are you sure?”. It says something more along the lines of “Don’t you want to save your document before closing Word?”.