Category Archives: calculators

Disclaimer

Sydneysmith.com is not affiliated with the Hewlett Packard Company or with Hewlett Packard Australia Ltd.

The calculator emulators on this site are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Whilst the emulators are inspired by calculators designed and built by Hewlett Packard, Hewlett Packard is not responsible for the emulators nor for any shortcomings or any bugs in them.

Hewlett Packard and the HP logo are trademarks of the Hewlett Packard company.

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 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

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.

HP65 Program Codes

When you program a programmable calculator like the HP65 you press buttons and it remembers the steps you are telling it. Then when you run the program, it re-does those button presses again to calculate the result. Every time you run the program it does those steps. This happens even though you only entered them once. That’s the point.

Internally, the calculator stores a program code for each key press or combination of key presses. With the HP65 it is mostly “one key press, one stored code” but there are a few combinations it recognises and saves as one program code. These are called “merged program steps”.
Continue reading HP65 Program Codes

HP65 Default Program

This is what ends up in program memory at startup.

000: 63 =077
001: 61 =075
002: 43 =053
003: 30 =036
004: 8  =010
005: 20 =024
006: 42 =052
007: 43 =053
008: 28 =034
009: 14 =016
010: 50 =062
011: 42 =052
012: 43 =053
013: 27 =033
014: 8  =010
015: 19 =023
016: 42 =052
017: 43 =053
018: 26 =032
019: 13 =015
020: 42 =052
021: 43 =053
022: 24 =030
023: 17 =021
024: 42 =052
025: 0
026: 0

Continue reading HP65 Default Program

HP21 Emulator with 12 Digit Display

It’s updated! I’ve finally fitted the 12 digit display into the HP21 emulator.

hp21-12digits

It has also had a bit of a tidy up internally and it has some of the new features from the other emulators. You can copy and paste from and to the X register, and you can see what is in the stack (and memory) at any time.

The product page is here. I think you’ll like the improvements.

HP67 Emulator Released

A funny thing happened on the way to fixing a HP21 emulator.

I’d been updating the software to deal with a 12 digit display and started with the 15 digit display in my HP67 emulator. I haven’t fitted the original fix yet, but on the way I ended up with a HP29 emulator and now an updated HP67 emulator.

The ’29 doesn’t have a card reader so, in the real world, every time you want to load a new program you have to key it in by hand. Life was a bit better with the ’29 than most prior models because it remembered programs even when it was switched off. Hence you no longer had to key in the same program again; only different ones.

With the HP29 emulator, I wanted to make this task easier and I came up with a method that allows pasting a pre-written program in, or copying an entered one out. There were a number of other niceties added that should always have been present in my original HP67 calculator emulator. So, having figured them out for the HP29, I wanted to retro-fit similar things to my HP67 calculator emulator.

Very few got to see the original that the recent spate of emulators was based on because I wasn’t parting with it unless someone paid me to change my mind. The later ones have been released for free so the updated HP67 emulator is now being released for free too. Hopefully you’ll like it.

It looks like:
gss-hp67
and runs on any phone, tablet or browser (that supports HTML5).

I liked the copy and paste idea so much I added that to the HP67 emulator, even though it has a card reader. The twist is you can copy and paste program or data “cards”; not just program information. These include settings such as the angle mode and the value of the flags. They also include labels for the “magnetic” card for when you slide it into the slot above the A to E keys.

Copy and Paste also allows it to work on phones as access to the real filesystem, especially from a HTML5 page, is difficult and varies from device to device. That said, the card reader is functional and allows reading and writing cards from and to the HTML5 storage on the device. If you want to put a card into a regular file, load the card and then use copy and paste it wherever you like.

One of the other changes was inspired by Jacques Laporte (www.jacques-laporte.org). He has been updating his microcode simulator and added a tab to the right of the card slot. Clicking that loads a “mag” card just like on the real thing. I’d already been doing something similar (the entire area above the A-E keys is click sensitive) but seeing the ” Crd ” in Jacques’ simulator inspired me to make a few tweaks. The original just fired up a page to allow you to choose a card to load or to name one to save on (or reuse an existing one). This version puts the ” Crd ” message in the display just like the real thing, and then waits for you to tap/click the card slot. That sure brought back memories. I hope you like it.

The ” Crd ” message:
gss-hp67-crd

The product page is here.

HP29 Emulator Released

It has been available for a couple of days now and I’ve just tidied the website up enough to be able to talk about it.

A HP29 calculator is fairly unusual. There are quite a few emulators available for other HP Calculators, especially the HP35, HP45 and HP25. And of course for the more recent ones such as the HP41 and HP48. However, the HP29 hasn’t had the same degree of interest and that is surprising because it is a very good calculator.

The main one I found was MikeT’s emulator which is part of a wonderful collection here.

Mike’s is really nice and I love that it is part of a set. The only downside is it won’t run on my phone. So, as part of a project to change my HP67 emulator display software to work for other “woodstock” models which have a 12 digit display, I did a HP29 emulator. The woodstock series were the HP21, HP25, HP29 and HP67 (plus the financial models). The HP67 had a 15 digit display like the “classic” series (HP35, HP45, HP55, and HP65). HP changed to using a single digit to display both a number and a decimal point. Previously, the decimal point had it’s own position and showed as ” .” instead of “n.”. Enough of the background.

The emulator looks like:
gss-hp29

Tapping the display brings up a menu that will show you a lot of information, including a full listing of what is in program memory. It isn’t just a listing either. You can edit it right there in the page and when you exit that page the calculator program gets updated too. The other plus with this approach is you can copy and paste programs in and out of the calculator even though it didn’t have a card reader. That’s much better than keying it in by hand.

The software doesn’t care about the line numbers so you can paste two programs together and it will merge the two properly; even if it starts again with line one further down. Exiting and returning to the page will renumber them properly.

The product page for it is here.

HP21 Emulator Released

Well, actually, it has been released for some time now; but I’m planning on getting a few articles up and I want the order right. According to the server timestamps, it has been up since 13 March 2012.

The emulator looks like:
gss-hp21

You can click the display to call up some additional options. The most important of these is “Help”.

You can find out more about the calculator and the latest range of emulators on the HP-21 topic page.