Bill Gates has been a controversial figure in the Computer World for 50 years now.
Back in 1976, he famously (infamously?) wrote a letter bemoaning what he saw as rampant piracy of BASIC. Micro Soft was selling their version of BASIC, which is quite good for a whopping $150. This was fine for a company, but to a "tinker in your garage" person, $150 ($760 or so in 2022) was pretty steep.
It's hard to tell which of these stories from that era are based on truth and which ones have morphed into "legend" status. Legends tend to become bigger and more important than they were at the time.
Anyway, the short version is that it fueled an effort that was already underway for several other BASIC implementations. TinyBASIC is the one we'll be using today.
This effort was also credited with coining the term "copyleft".
TinyBASIC is an implementation of the BASIC language. It was originally specced out by Dennis Allison, published in People's Computer Company Vol.4 No.2 and reprinted in Dr. Dobb's Journal, January 1976.
Great, integers only, strings are second rate. Let's code something!!
A k-Almost-prime is a natural number n that is the product of k (possibly identical) primes. It should be something BASIC can handle just fine.
Tiny BASIC Version
I keep finding this version on the interwebs without the line numbers in some places. I don't know if it's the version I'm using or how the PAL-1/KIM-1 is outputting to the terminal, but it REALLY doesn't like lines without the numbers.
The paper tape file for the version I'm using is here if you want to give it a go.
TinyBASIC (the version I'm using) does not have FOR-NEXT loops, so we've got to increment and GOTO here and there instead.
So with a few modifications for formatting and adding line numbers, we have:
How about porting this to Apple's integer BASIC, which does have FOR-NEXT loops, or Commodore BASIC (see Bill Gates, we still like your version even if it wasn't really your original idea)? If you do, let me know, I want to see it!