HP-25/HP-25C Shooting Gallery!

Back to main page | Email me at: Gene!


The program presented below will play a game called "Shooting Gallery" for the HP-25 and HP-25C. It was written by John Fiveash (who lived in Hong Kong at the time) and appeared in the V5N10P17 issue of PPC Journal (December 1978). Thanks to John wherever he is today!

This program utilizes a useless feature and a problem with the HP-25 to provide a game that is a test of skill

If you key in a program of ten 8's, press CLX and GTO .00, every time you press the R/S key, the display will quickly zip across from left to right. This is the "shooting" display in this game (and the useless feature).

Since this is during a digit entry part of a program, pressing the R/S key will enter the number of 8's passed so far by the program. When R/S is hit again, however, the remaining 8's are entered as a separate number. (This is the problem with the HP-25). The program knows how many 8's were contained in the program lines, so by counting the number entered after the R/S, you can determine the number of 8's that had gone by before the first R/S had been pressed.

Now, we need a target. Generate a random one digit number and turn it into a decimal number between 0.000010000 and 0.000000001. The 1 is the target.

When you fire, you should be able to stop the program so that the last 8 in the display coincides with the 1 in the target. If you do, you score a hit and the display will puase to show that you have earned 1 point and then proceed on to the next target.

The rules are simple: After you have keyed in the program and stored a random number seed (decimal between 0 and 1) into memory 0, press R/S and wait for the target display (this will vary depending on the number generated, so it won't always take the same amount of time). After the target is displayed, the shooting display will immediately begin. Press R/S to stop the shooting display when it coincides with the 1 in the target. Press R/S again to check for a hit and the game will continue. You may check your score so far anytime you've stopped the shooting display by pressing RCL 2. You may then press R/S to continue and the your last shot will be unaffected.


Program Listing: Email if you have any questions.
Line      Instruction  Keycode(s)
01         1            01
02         STO + 3      23 51 03
03         RCL 0        24 00
04         9            09
05         9            09
06         7            07
07         *            61
08         g FRAC       15 01
09         STO 0        23 00
10         1            01
11         0            00
12         *            61
13         f INT        14 01
14         5            05
15         X <> Y       21
16         f X < Y?     14 41
17         GTO 03       13 03
18         STO 1        23 01
19         CHS          32
20         g 10^X       15 08
21         f FIX 9      14 11 09
22         f PAUSE      14 74
23         CLX          34
24         g NOP        15 74
25         f FIX 0      14 11 00
26         8            08
27         8            08
28         8            08
29         8            08
30         8            08
31         8            08
32         8            08
33         8            08
34         8            08
35         8            08
36         8            08
37         f LOG        14 08
38         f INT        14 01
39         RCL 1        24 01
40         +            51
41         9            09
42         f X NE Y?    14 61
43         GTO 01       13 01
44         1            01
45         STO + 2      23 51 02
46         f PAUSE      14 74
47         GTO 01       13 01

That's it!