Saturday, October 10, 2009

TI-85


When I was in High School, we started using graphing calculators in all my math classes and some of my science classes too - geometry, algebra, pre-calc, physics, and statistics are the ones I remember. There were a few choices for which calculator to use, but the teachers typically had the TI-81. It was about $75 at the time if I recall. They had a little device that hooked the calculator into the overhead projector and were off to the races.

I, of course, would never have been satisfied with the TI-81 knowing that there was another, more powerful alternative - the TI-85. It was more expensive, but way more powerful and included a BASIC-like programming language. Back in the time when there were no iPods or sub-5lb cell phones - back when pagers were just beginning to be all the rage for people other than drug dealers - the TI-85 was the hand-held device of choice at school. Disguised as a tool for learning, it doubled as a Gameboy during study halls with soundless black and white games like Breakout and Battleship. I knew mom and dad would have gotten me the TI-81 as a "school supply", but I wanted the 85. I wanted it bad enough I made the ultimate sacrifice for a kid - I asked for it as my only big Christmas gift.

While my brother and sister opened their toys, I unwrapped a piece of electronic school equipment that came with a 350+ page manual about levels of math that I didn't yet understand and some I had no intention of ever learning. But it had 20 pages of pure gold at the back of that manual that told me how to program with it. And I was hooked.

I had programmed before. My dad got the family one of these as a gaming system and gave me a book with BASIC code in it. The program was saved off to a tape. I made a game, not from my own imagination, but from the meticulous transcription of pages of code from some book for a game I didn't understand and didn't really enjoy playing once it was done. I understood what programming was, but not really how to program. We got an 8088 when I was in 2nd grade, so I was familiar with computers, but not so much with programming them. The TI-85 was a portable coding device where I was limited only by my imagination and the hardware.

The programming was actually quite awful. LABELs and GOTOs abound. A callable method was coded as a separate program, so you could have 10 different unusable partial programs whose only purpose was to serve one master program. Needless to say I quickly learned to use the GOTOs instead, though thinking of it now makes me cringe.

I made programs that calculated the present and future values of loans with compound interest. I coded up a brute force calculation to discover what fractions reasonably approximate PI (22/7 and 355/113 are good ones). And, I made an adventure game called Gack that took one whole weekend to build and nearly every bit of memory on the calculator.

The concept of Gack was simple - it was a Dragon Warrior style game. You were a warrior trying to survive and gain gold and experience so that you could buy stuff and level up. There were 4 maps, each with progressively more difficult enemies. Each map had two locations, and each location had two different enemies that would attack you at random. If you defeated an enemy, you got gold and experience and could eventually advance to harder maps. If you lost, you would lose 1/2 of everything and have to start over at the shop. There were really only a handful of images in the game - the maps and the picture of the shopkeeper. The rest was text.

The final battle was a shocker - once you finally had enough gold and experience to buy the last item you needed, you entered the shop and the image flipped back and forth progressively faster between the normal shop keeper and a negative image of the shop where the shop keeper was revealed to be a skeleton. Once the back-and-forth reached a seizure inducing rate, the image stuck on the negative and the skeleton used the final weapon against you. You only had a 30% chance of victory against him, which made it a little awkward starting back in the shop with 1/2 your stuff like nothing just happened when the evil shopkeeper offed you. Perhaps this was a subliminal venting of some frustrations with working retail... hmmm...

Anyway, you could share programs with others via a cable, but not many people were willing to wipe out everything they had to take on Gack. Truth be told, I never actually played it all the way through. I built the thing - but there was no magic in playing it.

My most popular program, by far, was a program that intercepted key presses and simulated functions within the calculator without actually performing them. The reason I wrote this was that our pre-calc teacher was afraid of cheaters, and so he wiped the memory on everyone's calculator before a test. I never cheated myself, but I know I enabled others to do so. But I put way too much work into my programs to have them deleted, so I would start up this program on test days. When the teacher made his rounds and wound up at my desk, he would press the keys for the memory wipe sequence and the calculator showed all the right prompts - pixel for painstakingly designed pixel - and reported the memory was gone. It even showed an empty program launcher in case he checked. But my precious code was completely in-tact in the one and only place it was ever saved.

I still have the calculator in my desk, and it still works. Though I don't keep batteries in it and never use it. It's funny to think of all the various languages I've programmed with over the years: BASIC, VB, Pascal, assembly, C/C++, Java, ASP/VBScript, JavaScript, T-SQL, Perl, Ruby, C#, Boo, VB.NET, and probably plenty of other little ones I've forgotten from college courses (I know I learned and forgot a whole lot of LISP at one point). But really, my love of programming all started with this little calculator. Best childhood Christmas gift ever.

2 comments:

schmonz said...

My story's a lot like yours. I still have my 81, 82, 85, and 92, and I'm still on the ticalc.org staff mailing list, though I haven't read any of that mail in years.

mattmc3 said...

Doesn't it make you wonder about the the next generation of coders? I feel like I learned from the ground up. Maybe that's not considered an advantage, but I tend to think that it was.