Logic Game for the HP-65 (Hi/Low Game)

Back to main page | Email me at: Gene!


The program presented below will play a game called of High/Low for the HP-65. It was written by Greg Merriman and appeared in the V2N3P40 issue of PPC Journal (March 1975). Thanks to Greg wherever he is today!

It's basically a high-low type of game, but it's small enough that you might even key it into an HP-65 even if its card reader doesn't work any longer.

Instructions:
1) Load the program into the calculator and change back to RUN mode.
2) Enter the initial decimal seed and press A.
3) Enter your guess for the number and press B.
4) The display now shows the guess as a negative number if you were too low or a positive number if you were too high.
5) Continue guessing until you find the secret number. When you do, the number of guesses you took will be displayed.
6) For a new game, press C.


Program Listing: Email if you have any questions. A few interesting notes about HP-65 programming can be seen in this example. Since many instructions were not "merged" into one step, HP-65 condition tests skipped TWO instructions after the conditional instead of only one, as most other HP calculators later did. This was because the GTO X instruction took two steps. That is why you can have instructions such as g X = Y, RCL 7, RTN, which would be more difficult to implement on other HP's. Note that some steps were merged: STO X and RCL X were, as well as many of the common instructions such as g LSTx, g X = Y, etc. However, STO, +, 7, required 3 steps of memory!
Line      Instruction   Keycode
01         LBL           23
02         A             11
03         9             09
04         9             09 
05         8             08
06         STO 5         33 05
07         g RDN         35 08
08         STO 4         33 04
09         LBL           23
10         1             01
11         2             02
12         9             09
13         RCL 4         34 04
14         *             71
15         f-1           32
16         INT           83
17         RCL 5         34 05
18         *             71
19         1             01
20         +             61
21         f             31
22         INT           83
23         1             01
24         0             00
25         0             00
26         g X < = Y     35 22
27         GTO           22
28         D             14
29         LBL           23
30         C             13
31         g LSTx        35 00
32         f-1           32
33         INT           83
34         STO 4         33 04
35         GTO           22
36         1             01
37         LBL           23
38         B             12
39         1             01
40         STO           33
41         +             61
42         7             07
43         g RDN         35 08
44         RCL 6         34 06
45         g X <> Y      35 07
46         g X = Y       35 23
47         RCL 7         34 07
48         RTN           24
49         g X < = Y     35 22
50         CHS           42
51         g NOP         35 01
52         RTN           24
53         LBL           23
54         D             14
55         g RDN         35 08
56         STO 6         33 06
57         f             31
58         STK           42
59         STO 7         33 07
60         RTN           24

That's it!
Visitors since 8/4/97