Below you will find pages that utilize the taxonomy term “PET”
Adding very large integers in 8 Bit BASIC
As we’ve discussed, large integer math is a pretty interesting problem, even for modern computers.
What if we wanted to add very, very, very large integers without using scientific notation, but this time let’s do it extra slowly. Extra slow… this seems like a job for BASIC!!
Strings
We’re going to need to use strings. On the Commodore BASICs of the 80s, strings have a max length of 255, so the largest sum we’ll be able to represent is:
The terrible random number generation in the Commodore 64 (and 128)
Quite a while ago, I started playing with random numbers on 8 Bit machines. I don’t think anyone is doing “serious” work on these machines, but playing with Ciphers and Crypto got me at least curious about how a Commodore 64 generates random numbers.
There are many ways to determine randomness. Humans are pretty good at picking out patterns in visual representations. Luckily our beloved machines have easy screen memory access. Let’s poke some random stuff to the screen and see what we see.
Getting green and amber screens from a MiniPET 40/80
In mid-2021, I built a MiniPET 40/80. It’s one of the best replica kits I’ve ever seen. Even the keyboard is wonderfully awkward to use, just like a real Chicklet PET keyboard is.
Switching between ROM versions with DIP switches has been great for learning and experimenting with internals.
My only wish is that I could occasionally get a green screen out of it. I use the composite output, which is black and white (just like many original PETs), but the 7-year-old in me just loves a Green Screen PET.
So I was on Twitter one day when someone (I’m sorry, I’ve forgotten who) pointed me to a small project by a chap in Spain. This takes a monochrome VGA signal and lets you change the colors with dip switches. AND it was only 9 bucks.
Just for fun, the 100 door problem on several different systems
What’s the 100 door problem?
It’s a just for fun problem in “beginning” math and computer courses. The idea is simple:
There are 100 closed doors in a row.
You walk past the doors 100 times (100 passes)
The first time, visit every door. If the door is closed, open it. If it is open, close it. In programming, you’d probably call this toggling the door so let’s call it that.
Running Commodore 64 BASIC Programs on a PET
The Commodore 64 and PET are fairly similar systems. Other than a few memory location differences, many BASIC programs written for the Commodore 64 that don’t use graphics can run on a PET.
There is one caveat. The PET doesn’t relocate a saved BASIC program to the beginning of BASIC, like all of the Commodore lines after it. So if you find yourself trying to load a program on your PET written on one of its younger siblings, you may wonder why it loads, but you can’t find it.