Tag Archives: applesoft

My Apple IIe: Introduction to AppleSoft Basic

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!

Thanks for your interest!

Kurt

My Apple IIe: A simple text based arcade game in Applesoft Basic

apple-second-logo-rainbow-bitten

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

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.

applesoft-iia

Code

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

Emulators

If you don’t have a working Apple IIe of your own to try your Applesoft code on, you can first try it in a JavaScript implementation of Applesoft Basic.  There are some things that this emulator cannot do, though.  It’s just not terribly robust.

A very robust option is the standalone Apple II emulator program that you can install onto your Windows computer.  It’s called AppleWin.  Just scroll down to the bottom of the Github page and download the latest release.  It’s in a zip file, so just unzip it and run the executable.

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.

Thanks

I hope you found this post informative and/or entertaining!  Thanks for your interest!  And feel free to leave comments or questions below!

Thanks,
Kurt