HP 67 simulator Quick user guide
To use the simulator in trace mode, check "debug" (red light on).
1) Put a break point at the start of the code you want
to trace (address 0217 - "keys ->a" instruction- is a good place to start : you
can intercept all keys pressed on the keyboard and trace the flow from there) :
- the value appears in the white box,
- "set" the BP,
- "enable" it (red light on),
2) Press "run" : the simulator is running the HP 67 ROM image,
3) Enter your key,
3) You should stop at address 0217,
6) Now turn on "trace" and "regs", depending on your
need: trace alone or trace with registers.
7) I have added to the usual interface a window several facilities:
"CARD" : simulates a magnetic card insertion when
requested by the firmware.
When in PRGM mode, pressing "CARD" stores the program steps in the CARD Window,
Ctr a and Ctr C allows you to save it in a text editor.
Pressing "CARD" in RUN mode loads the program, into the CARD window.
Here is a demo CARD : the
small program computing the area of a circle (enter the radius and press the A
key) - Ctrl A in the browser to be sure to select all - Ctrl C to copy and Ctrl
V into the applet window.
Cards must be a pure text file and can be stored on your PC or MAC.
If 2 cards are requested, the simulator displays "Crd" to prompt you for side 2 (more than 112 steps) : repeat the procedure.
For Data, the function "f W/DATA" is doing the same thing as on the real HP-67, saving data registers for future use.
To save data press "f W/DATA" and the simulator will
prompt you for one or two cards (if secondary registers are not empty).
To load a data card in the simulator, paste the text in the Card Window and
press "CARD".
To use the "Merge" function refer to the HP-67 manual.
other buttons in this version (2.2) :
MP : dumps the program memory to the applet window,
MD : dumps the data memory,
Clr : brings the 2 applet windows to the front of the window stack, in
case the are hidden.
8) You can also point in the Trace window, do a select all (Ctrl A) then a copy
(Ctrl C) and save (Ctrl V) in your Text editor to study a trace.
On a Mac (replace the Ctrl key by the Apple key) and do not use TextEdit (that
creates RTF files) ; you can use TextForge (free) or TextMate instead.
9) When a key enters its subroutine a beep is emitted
(at the keys ->a" instruction) and the display is turned off by the
ROM code.When processing is over, the display in back showing the result.
Meanwhile, the keyboard is ignored. So take care in "slow" or "trace" modes,
since -in these cases- the simulator is slower.
To avoid that, put a break point at the beginning of the routine you want to
study, go in "run"
mode, type in your number(s) and press the function key.
I'll publish progressively tables of routine addesses.
When processing is stopped at BP, turn on "trace" and "regs" modes and press
"run" again. The trace of the routine run will be saved to the capture window.
15 feb 2008 : The "h" key is bringing the black labels on the right keys, for better visibility.
Jacques Laporte
22/01/2008
in collaboration with Eric Smith.