Hewlett-Packard HP-97

Some ten years ago, a good friend of mine worked as the manager of a local flying club where I was taking flying lessons. I helped him with some computer problems there and he wanted to compensate me for my efforts. I told him that he shouldn't, but then I noticed this old, discarded HP-97 calculator collecting dust there on top of a filing cabinet, and asked him to give it to me. He happily obliged.

At home, I took the machine apart and cleaned it thoroughly. I then phoned Hewlett-Packard, and was delighted to find out that they still provided support for this model: I was able to order a new rechargeable battery, a manual, and a set of magnetic cards. When these arrived, I was able to power up the calculator, which worked perfectly.

For several years afterwards, I used the calculator and its built-in printer to help me with my tax calculations. I also wrote a couple of simple programs on it just for fun, reminding myself of the old days when calculator programming was one of the most important hobbies in my life.

Unfortunately about five years ago, the calculator's card reader began acting up, and eventually stopped working altogether. Cards weren't pulled through and when I tried, a yucky deposit appeared on them. Eventually the calculator fell into disuse.

Last year, I rediscovered this beast. Its battery was again dead of course, but to my delight, Batteries Plus rebuilt the pack professionally for a modest fee. The calculator was still working, without its card reader of course; but this time, I was determined to find out what was wrong and perhaps repair it if I can.

So I took the calculator apart and removed, then disassembled its card reader. The problem didn't take long to discover: the rubber of a wheel that is used to forward the cards through the reader (the rubber pinch wheel is what I believe it is called) has completely disintegrated. I did my best to remove all the rubber deposits from the reader, put the reader back together, and began scratching my head as to where I can find a suitable replacement for the pinch wheel.

Earlier this year I found a solution: a small rubber ball that we purchased as a toy for our cat seemed to have the right kind of material. I was able to shape a suitably round and smooth wheel out of it, which I inserted into the reader. I also managed to readjust the small pressure switches inside that sense the card as it moves through the unit. Another problem, as it turned out, was the worn clutch of the motor that drives the mechanism; worn because of repeated attempts to spin the motor when the reader mechanism itself was stuck. After many tries, however, I eventually ended up with a reader that was able to record and read cards perfectly, and has been working reliably for some time now. Being a software guy, I viewed my hardware success as a major victory!

This calculator works so well, in fact, that I now use it as a prototype testbed for some simple algorithms. It's really nice when you have a reliable card reader! Mind you, I still have this acquired habit of always recording my programs in triplicate and keeping two copies after I verified their readability... as they say, the Devil never sleeps. I also used my newly acquired skills to fix the card readers and other problems in two additional HP-97s that I recently obtained; these will be good as spares or as units for trade.

Turning to the subject of programming, the HP-97 (along with its printerless twin, the HP-67), a member of Hewlett-Packard's second generation of personal calculators, offered fairly sophisticated programming features. It had 224 fully merged program steps (many multikey functions, including some requiring three keystrokes, used only a single step of program memory), 26 data registers, a collection of flags, conditional statements, label addressing, and more. The entire contents of program memory could be recorded on the two sides of a magnetic card. Along with the usual complement of scientific and statistical functions, this made the HP-97 a very nice calculator indeed.

Here is my current implementation of the infamous Gamma function for the HP-67/HP-97. Unlike some of my other Gamma function programs, this one does not require that you enter any constants into data registers; the constants are part of the code. This program calculates the Gamma function for any real argument, except for negative integers, for which the function has no value. The program only uses registers D and E for temporary storage.