The HP67 calculator has 4 flags. These can be set, cleared or tested. You use them in a user program to remember situations and to behave differently according to the situations. One example might be: the user entered a value (or not) and your program behaves suitably either way. There were a whole stack of programs at the time where you could enter a value and press [A], [B], [C] etc to store the value; or just press the button to calculate it. These included tax calculators, principal and interest calculators and ohms law – key in any two and press the third button for it to work out the third value. Continue reading HP67 Flags
Category Archives: hp67
HP67 Error Routine
The HP67 Error routine displays “Error”, flashes once (blank out and then comes back) and then waits for a keypress to clear the error message. It works like this Continue reading HP67 Error Routine
HP67 f CL PRGM
This needs more analysis, but here’s what happens when you press [f] [CL PRGM]
Continue reading HP67 f CL PRGM
HP67 Card Reader – Default Functions
The HP67 card reader contains two instructions that control a “default functions” flag.
The card reader integrated circuit is a Mostek MK6250N. That connects to the Arithmetic, Control and Timing (ACT) chip and actions a number of instructions that the ACT doesn’t understand. Instructions are 10 bits long. For this article the ones we are interested in are: Continue reading HP67 Card Reader – Default Functions
HP67 Card Reader
This is a work in progress and likely to be updated.
The HP67 Arithmetic, Control and Timing chip (ACT) is a Mostek MK6216N. It understands most of the instructions but the HP67 card reader chip (CRC, a Mostek MK6250N) adds instructions and two more data registers: Continue reading HP67 Card Reader
The HP67 Keypress Routine
When the HP67 detects that a key has been pressed, it exits the HP67 Keypress Wait Loop and gets to instruction 0214 (octal). Then this happens: Continue reading The HP67 Keypress Routine
Woodstock Microcode
Woodstock was the name HP gave to its newer model processor for its newer model calculators at the time of the HP-67, HP-21, HP-25/C and HP-29. Here’s what was in it: Continue reading Woodstock Microcode
The HP67 Keypress Wait Loop
This is the microcode in a HP67 calculator that waits for a key press.
00167: 0 -> s 3 00170: CRC 1500 00171: if 1 = s 3 00172: then go to 0263 00173: 0 -> s 1 00174: CRC 300 00175: if 1 = s 3 00176: then go to 0204 00177: if 0 = s 11 00200: then go to 0206 00206: 0 -> s 3 00207: CRC 560 00210: if 1 = s 3 00211: then go to 1324 00212: if 0 = s 15 00213: then go to 0167
It spends most of its time in this loop just checking to see if there is anything to do.
The addresses above are in octal. All of them are < 256 decimal so they are all in rom 0 of the first “quad rom” (one chip with 4 lots of 256 microcode instructions). Roms 0, 1, 2 and 3 are in the first quad.
The CRC instructions are “card reader circuit” commands.
CRC 1500 checks a flag in the card reader and if set, sets the s 3 flag in the calculator (and clears the card reader flag). I don’t know what the flag means yet but 0263 is likely to answer that.
CRC 300 checks the run-w/prgm switch. If you are in “W/PRGM” then it sets the s 3 flag. It clears it if you are in “RUN” mode.
CRC 560 checks whether a card has been inserted into the card reader. If so, s 3 gets set. If not, s 3 is 0.
s 15 gets set when a key has been pressed. This suggests that 00214 onwards deals with a key press.
s 11 is a mystery at present. If does seem to go into code that checks whether MERGE has been selected so it may be card reader related.
The HP67 and Non-Normalized Numbers
This is an interesting side note for fanatics. You can skip this if you are not a fanatic.
NOTE: If you have a HP97 don’t use non-normalized numbers (NNNs).
The HP97 is a printing version of the HP67. NNNs burn out the print head on a HP97.
The HP calculators used binary coded decimal (BCD) to fit numbers into registers (X, Y Z, T) and into memories.
Internally, numbers were stored in SCIentific notation with a 10 digit mantissa and a 2 digit exponent. When you add a sign to the mantissa and to the exponent you end up with 14 BCD digits: SMMMMMMMMMMSEE. S is 0 if the mantissa or exponent is positive and 9 if negative.
14 BCD digits occupy 15 display positions as the decimal point is always right of the first mantissa digit and, on the HP67, a decimal point occupies a display position of its own.
BCD defines meanings for 0-9 but each four-bit nibble can also hold other values (0x0a – 0x0f in hexadecimal notation).
The display uses values outside of 0-9 to display the messages you see such as “Error” and “Crd”.
Nibble values in registers display as: 0-9 = 0-9; A = “r”, B= “C”, C=”o”, D=”d”, E=”E”, F=” “.
The 14 BCD digits occupy 7 bytes of memory. Each program step occupies 1 byte (even if it is 3 keystrokes).
One way of creating NNNs was to key in program steps, write these to a mag card and then write a data header over the start of the card (f W/Data, insert card, turn the calculator off midway through the write). You could then load the card back in, as data, and see what appeared in the storage registers.
A more interesting way involved getting the program counter outside of steps 000-224 (it would point into a storage register) and then keying in program steps there.
See also:
Holy Joe
my notes from 22 Dec 2005