Applesoft Basic Is Still My Favorite Programming Language

Today I decided to come clean about something, I still love Applesoft Basic.

In Kansas City, MS there is a yearly meeting of Apple 2 enthusiasts, called KansasFest.  In 2004, I had the privilege of attending, but life has conspired against me since.  This year I was really hoping to go and finally do a presentation, but the air flight costs and my 2 week hike in September pushed the opportunity away again.  After presenting a short 6 minute lightning talk at Coworking Rochester in May, I contacted the organizers of KFest about possible doing a remote presentation.
 
Well, today during lunch, I did my presentation.  It was titled “Optimizing Algorithms in Applesoft Basic”.  This expanded on my previous work and added in some metrics and benchmarks.  
 
This started when with my friend Alan, we started experimenting with an algorithm entitled: Circle pattern by John Connett

The implementation we worked with was the pseudo-code:

input corna, cornb
input side
for i <- 1 to 100
for j <- 1 to 100
x <- corna + i * side/100
y <- cornb + i * side/100 
c <- int(x^2 + y^2)
if c even then plot (i,j)

Over time, Alan and I did some optimization and experimentation using any Applesoft book we could find.  It was during this that Alan and I present our lightning talk.
 
Alan moved away a couple of months ago, but I’ve continued to test and experiment.  Today I started to explain my findings.  There is nothing groundbreaking about this, but I never optimized in the 80s and 90s when I was heavily using Basic.
 
During my presentation, a member of the audience (sorry I don’t know whom as I was looking hard at my demos), found an error in my code which had exists for a while.  Luckily this only resulted in an inversion of the screen, not any substantial change to the image.  I was also able to poll the audience to find out why I could not get anything to show up on the second high res graphic page (80 columns and HGR2 don’t like each other).  This allowed me to finally get a full screen image.

Over the next few weeks, I will trickle out some of my finding, sharing my results & code.
 
Following that, I will start to experiment with Apple Pascal, 6502 Assembler, Forth (if I can find it), Macrosoft, some native C variants and the cross compiler cc65.  
 
I will also add some color variation and eventually experiment with Double High Res (DHR) graphics.

Now as a tease, here is video of a run with a couple of different inputs.