The HP-25 was a great calculator. It had heaps of features right there on the keyboard. These included conversions between Rectangular and Polar coordinates and between Degrees / Minutes / Seconds and decimal degrees. It even had ENGineering notation and GRaDians. It was programmable and was, in some ways, better than the previous top of the line – the HP-65. From a programmable perspective, it had less steps (49) than the ’65 (100) but all 49 were fully merged. That meant if you needed two or three keystrokes for a function, all two or three would be stored in a single program step. The ’65 was similar; but not all combinations were fully merged. The biggest difference for me was the program display. The ’65 would usually display the keycode of the current program step, but not always. The HP-25 always displays the step number and the keycode. It is much easier to use.
What is truly impressive is the leap from the Classics to the Woodstock series of calculators. The HP-25 had SST (single step) and BST (back step), eight conditional tests, PAUSE, NOP, “hold down the key to see the program keycode” and INT and FRAC functions. When you added Continuous Memory with the HP-25C, it was even easier to load your favourite program than a HP-65 (instead of inserting a mag card, it was just “already there”). The HP-65 still excelled in some areas but the HP-25 wasn’t far from it. It’s no wonder it was so popular. I sure loved mine at the time. But all that isn’t the point of this article.
There are some things they didn’t tell you about.
The HP-65 and HP-67 calculators had card readers. You could load and save programs with those calculators. It was all perfectly reasonable – but then people discovered they could load “broken” programs and that they could load and run program steps that couldn’t be keyed in. It turned out that none of the extra functions did anything useful so the interest faded.
The HP-25 has similar “prgcode”s that can’t normally be keyed in from the keyboard in PRGM mode. There are a lot of them actually (16+16+3×6+3×3+2= 61).
Now, despite conventional wisdom that extra “prgcode”s don’t do anything useful, on the HP-25 some of them do!
They don’t calculate: the integral of an entered function, or the direction and distance from you to any selected planet in your current solar system; so prune back your expectations a little. Here’s the interesting ones:
Code | Shows as | Does |
“ab” | “14 0F” | ram[3]++ ie adds 1 to mem 3 |
“ae” | “14 0E” | (play dead) = display off, looping, no exit. Switch off/on again or restart emulator |
“af” | “14 0 “ | (play dead) |
“bb” | “15 0F” | STO+3 |
“ca” | “0r” | 10.00 – puts 10 in X |
“cb” | “0F” | 11.00 – puts 11 in X |
“cc” | “0o” | 12.00 – puts 12 in X |
“cd” | “0P” | 13.00 – puts 13 in X |
“ce” | “0E” | 14.00 – puts 14 in X |
“cf” | “0 “ | 15.00 – puts 15 in X |
“ed” | “15 00” | ENTER |
“ee” | “15 00” | (overwrite). Next val will overwrite X, eg digit entry or RCL |
The HP-25 is a very good actor and the play dead ones are very good impressions. It’s not really dead because you can see (in an emulator or a logic analyser) that the processor is still busily doing things.
Some of the unused prgcodes trigger the “Error” display. If these are used in a program the “Error” will stop the program so, in that respect, they are like R/S. If you had a program that does something like: “0, 1/x” specifically to show “Error” in the display; you could use one of these to save a program step. They are: “80”-“8f”, “bf” (“15 0 “), “dd” & “de” (both display as “14 00”), “df” (“14 40”), “e6” (“15 31”), “fd” & “fe” (“00”), and “ff” (“40”).
The remaining ones don’t change flags, stack values or memories. Some do a little or a lot of processing; but always without any big picture effect. They can be considered as NOPs. They are: “90”-“9f”, “aa” (“14 0r”), “ac” (“14 0o”), “ad” (“14 0P”), “ba” (“15 0r”), “bc” (“15 0o”), “bd” (“15 0P”), “be” (“15 0E”), “ec” (“15 25”) and “ef” (“15 40”).
“ec” (“15 25”) is the g SUM+ function I’ve wondered about for some time now.
“e6” (“15 31”) looks similar (g ENTER) but it can’t be keyed into a HP-25 in PRGM mode.
How do I use that?
If the HP-25 had a magnetic card reader, we’d load mag cards with the values. Given it doesn’t, the usefulness of these codes is rather limited.
That said, many emulators have the ability to enter prgcodes directly into program memory and to save and load programs. If you’ve got one of those (eg hp25u), program step 01 is the LHS of ram[9], program step 07 is the RHS, program step 08 is the LHS of ram[10], and so on.
Back in the day, Eric Smith came up with (or documented) ways of holding down multiple keys to directly enter unused prgcodes into a real-world HP-67. Something similar may be possible with the HP-25/C. It depends on the mappings of scancodes across rows and columns of the keyboard and the processing that happens as a result. The HP-25 processing isn’t a simple state and scancode to prgcode translation so an equivalent trick isn’t yet obvious. I’ll let you know if that changes.
Addendum
The “80”-“8f” prgcodes play havoc with the display keycode part of PRGM mode. You’ll find life easier if you don’t switch to PRGM if you are at one of those, or if you’re at 00 and one is in step 01. You won’t be able to start a program with one, as R/S tries to show the keycode as its first action. You won’t be able to SST through one. They’re not as fatal as non-normalised numbers in a HP-97, but they do get in the way. If you see a blank display, switch back to RUN and clear “Error” if that shows up. If all else fails: power OFF/ON on a real HP-25 or restart the emulator (on the hp25u that’s just hit refresh in the browser). The HP-25C doesn’t preserve the M1 register so restarting that will take you to step 00. You’ll still be stuck if there’s one of these codes in step 01. You may need to (disconnect any charger then) remove the battery, switch the calculator ON, and wait for CMOS to clear.