The Museum of HP Calculators
The HP-45 Microcode Simulator
This java applet simulates an HP-45 by running the actual
HP-45 firmware on a java simulation of the
HP-45 chip set.
Eric Smith originally created this application in C and X Windows in 1995
by piecing together the hardware design, as well as all the firmware by reading
HP's calculator patents. From
I made two changes:
I ported it to Java so more people could enjoy it.
I added the debugging console to the right so you can easily trace code,
single step etc. The idea is to let you learn about the internals of the
older HP calculators and to give you a feeling of what it might have been
like to program such devices. (A lot of debugging at the time of the HP-45
was done without any debugger at all - you just re-re-reviewed your code
until the device started to do something.)
The simulation is ready to run when "Ready." in the instruction trace window.
This might take a while on a slow connection.
You can only press the keys on screen - there is no support for your computer
The debugger is enabled by default. If you just want to use the calculator
alone, press the debug button to disable.
To enter a break point, press the digits on the octal input pad and then
press one of the set buttons. Then toggle the corresponding enable button.
You can get addresses from debugger display or the HP-45
Input may be rather sluggish during tracing. Calculator input is especially
slow because the calculator is slowed greatly by the trace. Breakpoint entry
may also miss digits if you click rapidly. It's best to turn tracing off
during digit entry unless you want to trace the digit entry code. It is possible
to enter a single calculator key with the calculator stopped in the keyboard
scanning code. On the real calculator, you'd have to hold the key down while
stepping but this feature was added since few people have two mice.
If you're using an 800x600 screen, you'll want to maximize your window and
reduce the browser toolbars to see the whole simulation. (In Netscape, click
in the control at the left of each toolbar.)
See the HP CPU Programming page for information
about the instructions.
Your HP-45 has a modified Enter key so that you can bring up the undocumented
timer by pressing RCL and then Enter. (On real HP-45s, this could be done
by gluing a small pad under the Enter key.) See the
HP-45 page if you need instructions on using the
timer. The accuracy will depend on the speed of your PC and whether you are
Please send bug reports to
The source code is available under the GNU Public
License. The zip file contains the Java code and the firmware listing.
Go back to the main simulations page
back to the main exhibit hall