Here’s what happens internally when you enter a number into a HP-65 calculator:
startup " 0.00" A =00000000000999 C =00000000000000 B =02009999999999 M =00000000000221 P =1 S =............ f =..2..5.. press 1 see " 1." A =01000000000000 C =01000000000000 B =02999999999999 M =00000000000221 P =1 S =.1.......... f =.12..5.. press 2 see " 12." A =01200000000000 C =01200000000001 B =00299999999999 M =00000000000221 P =1 S =.1.......... f =.12..5.. press 3 see " 123." A =01230000000000 C =01230000000002 B =00029999999999 M =00000000000221 P =1 S =.1.......... f =.12..5.. press . see " 123." A =01230000000000 C =01230000000002 B =00029999999999 M =00000000000221 P =1 S =.12......... f =.12..5.. press 4 see " 123.4" A =01234000000000 C =01234000000002 B =00020999999999 M =00000000000221 P =1 S =.12......... f =.12..5.. press 5 see " 123.45" A =01234500000000 C =01234500000002 B =00020099999999 M =00000000000221 P =1 S =.12......... f =.12..5.. press 6 see " 123.456" A =01234560000000 C =01234560000002 B =00020009999999 M =00000000000221 P =1 S =.12......... f =.12..5.. press [EEX] see " 123.456 00" A =01234560000000 C =01234560000002 B =00020009999000 M =00000000000221 P =1 S =.12....7.... f =.12..5.. press 8 see " 123.456 08" A =01234560000008 C =01234560000010 B =00020009999000 M =00000000000221 P =1 S =.12....7.... f =.12..5.. press 9 see " 123.456 89" A =01234560000089 C =01234560000091 B =00020009999000 M =00000000000221 P =1 S =.12....7.... f =.12..5.. press [CHS] see " 123.456 -89" A =01234560000989 C =01234560000913 B =00020009999000 M =00000000000221 P =1 S =.12....7.... f =.12..5.. press [ENTER] see " 0.00" A =00001234560999 C =01234560000913 B =02009999999999 M =00000000000221 P =1 S =............ f =..2..5.. D =01234560000913
Interestingly, it doesn’t switch to SCI display for small numbers. I was expecting to see ” 1.2346 -87″. This must have been introduced after the HP-65.
It looks like [.] sets s2 and [EEX] sets s7.
An exponent of -87 is stored as “913” (1000 + -87).
You can see that [ENTER] has copied stack X (C register) to stack Y (D register).
The value in C is always the current stack X value. As digits get added this gets updated. It isn’t just a copy of what has been keyed so far, into the A register – the C register exponent is updated too.
The A and B registers match standard classic calculator behaviour. I’m having trouble finding the article that described it to me years ago but it comes down to:
- What is in the A register is what appears in the display.
- That is modified by the B register: a 0 allows the A digit to appear, a 9 hides it (blank / off), a 2 inserts a decimal point to the right.
You can see this above by comparing the “see …” and the “A=” and “B=” values.
There isn’t a counter of which digit it is up to. It has to work that out each time.
Pressing EEX sets a flag but also clears the bottom three digits in B from “9”s to “0”s. This lets the exponent digits show.
Digits 13 (leftmost) and 3 are sign digits. They are wired to only show as ” ” or “-“. A “9” in those positions shows as “-“. A “0” shows as ” ” (for positive).