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.

It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUponDigg thisPin on PinterestEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *