- AI Something: The no BS everyday AI Newsletter
- Posts
- Commodore BASIC vs AI - AI Coding Assistant With Historical Programming Language.
Commodore BASIC vs AI - AI Coding Assistant With Historical Programming Language.
The Showdown We Have All Been Waiting For! When The Past Meets The Future!
“What was Microsoft’s first commercial product?” If one were to ask the proverbial person off the street that question, one would receive several answers such as Word, Excel, Windows, and even some older responders might say, DOS. But they would all be wrong. The answer is BASIC, specifically for the 8800-based MIPS Altair. Microsoft has a long history in programming languages from the beginning of the company. But have you ever wondered what you could do with AI using Microsoft BASIC? I sure did.
In today’s rundown:
đź“° Targeted Audience: Geeky Readers With Historical Knowledge.
🤝 AI & Human Collaborations.
Read time: 5 minutes.
The History

Microsoft’s First Product (Bill Gates Handwriting)
Arguably, the most famous of the early Microsoft BASIC versions was one created for a company known for typewriters and calculators, Commodore. This BASIC served as the backbone of programmability in Commodore’s early computers, the PET, the VIC-20, and its most famous creation, the best-selling single-version computer of all time, the Commodore 64.
Let’s try AI with Microsoft’s first product and create a prime number finder program in Microsoft/Commodore BASIC version 2 on the Commodore 64. My, honestly, quite rusty old-school BASIC skills will go first. I’ll write a prime number detector looking for primes from 2 to 150. Here is my highly unoptimized code:
30 ti$="000000" : rem resets the timer
50 print "prime numbers"
60 print "-------------"
100 input "upper limit=";li
102 if li>10000 then print "li=10000":li=10000
105 rem estimate number of primes
108 rem pi(x) = x/ log(x)
110 dim pi(int(li/log(li)+50)):
120 pi(1)=2:i=1: print pi(1)
130 for j=3 to li step 2
140 :k=0
150 :k=k+1: if k=(i+1) then print j,:pi(k)=j:i=i+1: goto 170
160 :if int(j/pi(k))<>j/pi(k) then goto 150
170 next j
180 print "time taken (seconds): "; ti/60
190 end
Let’s run it and see what happens . . .
Wow, that was painfully slow, 22 Seconds. Now look, I get that this is a 6502 derivative processor (6510) running at a blistering 1.023 MHz, but it has to be able to do better than that, even in BASIC. So I tried, for an hour, to get ChatGPT and other AI tools to create a replacement program from scratch that could beat 22 seconds using Microsoft/Commodore BASIC V2. And, nope . . . not only could I not get AI to beat my score, I could not get it to assemble a program that would even run. I did get a lot of syntax errors, though!

Gotta love error messages from 1982!
After an hour of prompt engineering, I was not only frustrated but also starting to think that perhaps there is not enough public data for any of the many AI tool sets to complete this simple programming task. This got me thinking that I may be going about this the wrong way. Perhaps I should share my code with one of these tools that are struggling to start from nothing? So, I did it with GitHub Co-Pilot. And yes, you better believe you can have typeahead in Visual Studio Code with Commodore BASIC V2.

Oh yeah, Commodore BASIC V2 in VSC!
This is the collaborative result:
So, Jason by himself, 22 seconds. Jason, with help from AI and the great work with integrating copilot in VSC via GitHub, 5 seconds.
That’s a wrap! 🌯
What does this tell you? AI is amazing, and these tools continually improve in capability, which never ceases to astound me. But, but, the combination of a human with AI as a tool, is the real superstar. We all fear change, and the ever-constant doomsday predictions that hover and proliferate all over the Internet are disconcerting. But from my experience, the question isn’t if you will have a job in 5 years; the question is how much faster and more productive you can be in the future.