In the past, when I was writing programs, I always wrote for my machine, the Apple //c. I knew what was there and could write for it.
While working on Mapper, I planned to use the 80 column card. But this time I’m writing with the idea of somebody else running it on their unknown machine.
So how does one check to see if there is an 80 column card? Off to Google I went. It turns out that since I’m using ProDos, I can ask ProDos if there is an 80 column card, sort of. ProDos loads a bunch of information into one byte called the MACHID. Information such as which computer, how much memory, avalibility of 80 column card and clock are all stored in this one byte.
I find that MACHID is located at $BF98 and with a little conversion from hex to dec I get 49048. If I peek at 49048 I get the MACHID byte. Now what? I’ve never really used bit manipulation, but I have a rough idea of how to brute force it by subtracting powers of 2 to get each bit. I wrote up a quick Applesoft program and it seems to work.
It is an ugly program and has some flaws but it let me check if I understood it correctly. I need to double check if I have the most recent information on the bit definition. It does not identify the //c+ or tell the difference between a IIe and an enhanced //e.
—
63/67

Leave a Reply