There is an unused code for the HP-67 calculator that displays as “h PI”. (It comes up as keycode “35 73”.) It is one of the six codes that you can’t normally enter into the calculator. What does it do? Does it key in PI, like the real one? Does it do something more interesting? Continue reading HP67 – The Other h PI
Tag Archives: microcode
HP67 – f LBL (i)
The “f LBL (i)” instruction is one of the missing codes that you can’t normally key into a HP-67 calculator. But if you do, what happens? Continue reading HP67 – f LBL (i)
HP67 Microcode – DSP 0
As you probably know, DSP n where n is one of the digit keys [0] to [9] sets the display precision. E.g. DSP 2 in FIXed mode gives you “0.00”, DSP 3 gives “0.000”.
Here’s how the internals do that Continue reading HP67 Microcode – DSP 0
HP67 Startup code
The hp67u emulator shows a “0.00” before you get a chance to select debugging so how can you explore the HP-67’s startup code?
Continue reading HP67 Startup code
HP67 DEG, RAD and GRD
The HP67 calculator has three angle modes: DEG, RAD and GRD.
DEG is degrees. There are 360 degrees in a circle.
RAD is radians. There are 2*PI radians (about 6.28) in a circle.
GRD is gradians. I’d never heard of these before I got my original HP67 but apparently these are used in some fields and there are 400 gradians in a circle.
Continue reading HP67 DEG, RAD and GRD
HP67 FIX, SCI and ENG
When you select FIX, SCI or ENG mode in the HP67 it stores 22, 00 or 40 in nibbles 5 & 4 of ram[62]. It works like this:
Continue reading HP67 FIX, SCI and ENG
HP67 h PI
The HP67 stores PI/4 in ROM subroutine 05043 with 13 digit precision. It multiplies that by 4 (“c + c -> c[w]” twice) to get 3.1415926535900 and then rounds that to 3.141592654.
It works like this:
Continue reading HP67 h PI
HP67 Flags
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
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.