HP-67/97 "One-Armed Bandit" Game

Back to main page | Email me at: Gene!


The program presented below will simulate a one-armed bandit slot machine on the HP-67/97. It was written by Roelf Backus from the Netherlands and appeared in the V4N9P13 issue of the PPC Journal (September 1977). Thanks to Roelf wherever he is today!

Instructions:
1) Key in the program and switch to RUN mode.
2) Enter a decimal seed between 0 and 1, and press f e.
3) Enter your payment (each game costs $0.25, so $2.50 payment allows you to play 10 games) and press D. Display shows a negative number representing the number of games allowed with that payment.
4) Pull the handle on the one-armed bandit by pressing E. The display will show a three digit random number.
5) You can, but don't have to, try to form a winning number by holding one, two or three digits and pulling the handle again. To hold the first number, press A. To hold the second number, press B. To hold the third number press C.
6) To hold all three numbers (which you need to do if you have a winning combination on the first pull), press f c.
7) Once you've kept the ones you want to or if you want to throw all of them away, press E to pull the arm of the bandit again. Display shows the newly formed number.
8) Repeat steps 4-6 until your money runs out. You will be shown a display of all zeros when that happens. Go back to step 3 at that point.
9) To see the money you've earned, press f d.
10) To cancel all holds on the numbers (from step 5), press f b. You may then hold new ones in step 5.


Winning Combinations:
x11   pays 1    111   pays 2
x22   pays 2    222   pays 4
x33   pays 3    333   pays 6
...
x88   pays 8    888   pays 16
x99   pays 9    999   pays 18

123   pays 4    246   pays 8
369   pays 12   492   pays 16
615   pays 20   738   pays 24
861   pays 28   984   pays 32

Program Listing: Keycodes are for the HP-67. Email if you have any questions.
Line      Instruction
01         LBL E
02         F? 0
03         GTO 3
04         RCL 0
05         X = 0
06         GTO 0
07         GSB 2
08         RCL E
09         *
10         STO 6
11         STO 9
12         GSB 2
13         RCL 4
14         *
15         STO 7
16         STO + 9
17         GSB 2
18         STO 8
19         STO + 9
20         1
21         STO - 0
22         RCL 9
23         DSP 0
24         RTN
25         LBL A
26         SF 0
27         SF 1
28         RTN
29         LBL B
30         SF 0
31         SF 2
32         RTN
33         LBL C
34         SF 0
35         SF 3
36         RTN
37         LBL c
38         SF 0
39         SF 1
40         SF 2
41         SF 3
42         RTN
43         LBL 0
44         DSP 9
45         RTN
46         LBL 2
47         GSB 1
48         X = 0
49         GTO (i)
50         RTN
51         LBL 1
52         RCL 1
53         PI
54         X^2
55         *
56         FRAC
57         STO 1
58         RCL 4
59         *
60         INT
61         RTN
62         LBL 3
63         CF 0
64         F? 1
65         GTO 4
66         GSB 2
67         RCL E
68         STO 9
69         LBL 5
70         F? 2
71         GTO 6
72         GSB 2
73         RCL 4
74         *
75         STO + 9
76         LBL 7
77         F? 3
78         GTO 8
79         GSB 2
80         GTO 9
81         LBL 4
82         CF 1
83         RCL 6
84         STO 9
85         GTO 5
86         LBL 6
87         RCL 7
88         STO + 9
89         GTO 7
90         LBL 8
91         RCL 8
92         LBL 9
93         STO + 9
94         RCL 9
95         PAUSE
96         RCL E
97         /
98         FRAC
99         RCL B
100        /
101        FRAC
102        X NE 0
103        GTO a
104        LST X
105        STO + 0
106        RCL 9
107        RCL C
108        /
109        FRAC
110        X NE 0?
111        GTO a
112        LST X
113        STO + 0
114        LBL a
115        RCL 9
116        RCL D
117        /
118        FRAC
119        X NE 0?
120        GTO a
121        LST X
122        4
123        *
124        STO + 0
125        LBL a
126        RCL 0
127        CHS
128        RTN
129        LBL b
130        CF 0
131        CF 1
132        CF 2
133        CF 3
134        RTN
135        LBL D
136        STO - 2
137        .
138        2
139        5
140        /
141        INT
142        STO + 0
143        RCL 0
144        CHS
145        DSP 0
146        CF 3
147        RTN
148        LBL d
149        RCL 0
150        .
151        2
152        5
153        *
154        RCL 2
155        +
156        DSP 2
157        RTN
158        LBL e
159        CL REG
160        STO 1
161        1
162        0
163        ENTER
164        X^2
165        STO E
166        X <> Y
167        STO 4
168        *
169        STO A
170        2
171        CHS
172        ST I
173        .
174        1
175        1
176        STO B
177        1
178        1
179        1
180        STO C
181        1
182        2
183        3
184        STO D
185        GSB b
186        CLX
187        RTN

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