It turns out that once you have access to some HP-25 functions that aren’t on the keyboard, you can put a lot of interesting “numbers” on the stack.
The question I wanted to check was this: when I use prgcode “ca” to give 10 in X, does it lift the stack?
If there is a final value on the stack (eg 4 ENTER 5 + or 1 X<->Y X<->Y) sure – it lifts. And if you do 3 ENTER 4 CLx, you end up with 3 in Y and, after running a “ca” program step, 10 in X.
There’s another one to check though: key in 5 then run “ca”. What does that do?
Here’s the before:
Here’s the after:
It doesn’t look like either: lifted or didn’t. It doesn’t seem to make any sense, until you see what is actually in the X register.
Here’s what that looks like:
You can see ” 60.00″ is in the display (A=06000… B=20100…).
But what is really interesting, is what is in C and M2 (the actual X register inside the HP-25 processor). That is “05a00000000001”. The sign is positive (first “0”). The mantissa is “5.a00000000” (next 10 digits, with a decimal point after the first one). The exponent sign is positive (next “0”), and the exponent is “01”.
We have 5.a x 10^1 or 5a. That is being shown as 5 tens plus 10 ones. i.e. 60.
But, but – but there’s an “a” in the digits! Yep, a non-normalized number.
I hadn’t looked before but when I went to key in 2 f 3 a 4 as program steps, I noticed that 2 is prgcode “c2”, 3 is prgcode “c3” and 4 is prgcode “c4”. Interesting right? Our “ca” to “cf” prgcodes are a natural extension of the “0” to “9” keys; instead of things that coincidently give those 10 to 15 values.
The 2 f 3 a 4 sequence doesn’t do what I’d hoped for. It isn’t a simple store a digit then move right one place. You get 24040.00 in the display and “023a4000000004” in C and M2. The earlier “f” got dropped.
It isn’t “earlier hex digits” though. It only seems to be “f” digits (perhaps it’s overflow / carry related). The following gave me what I expected: c2 cb c3 ca c4 (2 b 3 a 4). C and M2 = 02b3a400000004, i.e. “2b3a4”. That displays as “31404.00” (20000 + 11*1000 + 300 + 10*10 + 4 = 20000 + 11000 + 300 + 100 + 4 = 31404).
It turns out you can put non-normalized numbers in the X register of a HP-25/C.
STO 6 will happily store the non-normalized number as-is in memory 6. CLx RCL 6 will happily bring it back again (also with the hex digits intact).
Some of the fancier tricks we used to do with HP-67 non-normalized numbers (such as 0.00001e+00 taking much longer to divide than 1.00000e-05; and letters in the display) are still out of reach for now. However, there is more to the HP-25 than we thought previously.