HP-67/97 Blackjack Game

Back to main page | Email me at: Gene!


This program first appeared in the V3N9P38 issue of PPC Journal by John Rausch. Thanks to John wherever he is today!

Instructions:
1) Store an initial decimal random number seed into memory E. STO E.
2) Clear your winnings by pressing f e.
3) Enter your bet and press D.
4) Deal your cards by pressing A. Your first two cards are displayed during pauses, and your total is displayed with a blinking pause.
5) After your cards have been displayed, the HP's card is displayed as a negative number.
6) To take another card (Hit), press B.
7) To stand, press C. The HP-67 will then draw cards until it either beats you or busts, or reaches a total greater than 16.
8) Then your bet is displayed as a positive number if you won, or a negative number if you lost.
9) To review your winnings, press E.
10) Aces are counted as 11 or 1, depending on what will help you.


Program Listing: As usual, email with any questions. (Note: The -x- next to the PRTX instructions is showing what the PrintX command looks like on the HP-67).
Line      Instruction
01         LBL A
02         RCL 8
03         ABS
04         STO 8
05         9
06         ST I
07         CF 0
08         CF 1
09         GSB 0
10         ISZ
11         STO (i)
12         STO 0
13         STO 2
14         F? 3
15         SF 0
16         GSB 0
17         STO 4
18         STO 6
19         F? 2
20         SF 1
21         GSB 0
22         ISZ
23         STO (i)
24         STO 1
25         STO + 2
26         F? 2
27         SF 0
28         GSB 0
29         STO 5
30         STO + 6
31         F? 2
32         SF 1
33         RCL 6
34         F? 1
35         GSB 7
36         STO 7
37         X = Y
38         SF 2
39         DSP 0
40         RCL 0
41         PAUSE
42         RCL 1
43         PAUSE
44         RCL 2
45         PRTX (-x-)
46         RCL 4
47         CHS
48         F? 2
49         F? 2
50         RTN
51         PAUSE
52         GTO C
53         LBL 0
54         1
55         0
56         RCL E
57         PI
58         -
59         X^2
60         FRAC
61         STO E
62         1
63         3
64         *
65         INT
66         X = 0
67         SF 2
68         1
69         +
70         X > Y
71         RDN
72         RTN
73         LBL B
74         GSB 0
75         ISZ
76         STO (i)
77         STO 0
78         STO + 2
79         F? 2
80         SF 0
81         2
82         1
83         RCL 2
84         X > Y
85         GTO 2
86         DSP 0
87         RCL 0
88         PAUSE
89         LBL 1
90         RCL 2
91         PRTX (-x-)
92         RTN
93         LBL 2
94         CHS
95         STO 7
96         RCL 0
97         CHS
98         STO 5
99         GTO 5
100        LBL C
101        RCL 2
102        F? 0
103        GSB 7
104        STO 3
105        LBL 3
106        RCL 6
107        F? 1
108        GSB 7
109        STO 7
110        1
111        7
112        X < = Y
113        GTO 4
114        RCL 5
115        CHS
116        PAUSE
117        RCL 6
118        CHS
119        PRTX (-x-)
120        GSB 0
121        F? 2
122        SF 1
123        STO 5
124        RCL 6
125        +
126        STO 6
127        STO 7
128        2
129        2
130        X < = Y
131        GTO 6
132        GTO 3
133        LBL 4
134        RCL 7
135        RCL 3
136        X = Y
137        SF 2
138        X > Y
139        GTO 6
140        LBL 5
141        RCL 8
142        CHS
143        STO 8
144        LBL 6
145        DSP 0
146        RCL 5
147        CHS
148        PAUSE
149        RCL 7
150        CHS
151        PRTX (-x-)
152        DSP 2
153        RCL 8
154        F? 2
155        CLX
156        STO + 9
157        RTN
158        LBL 7
159        2
160        1
161        X <> Y
162        1
163        0
164        +
165        X < = Y
166        RTN
167        LASTX
168        -
169        RTN
170        LBL a
171        DSP 0
172        9
173        X <> I
174        STO D
175        LBL 8
176        RCL D
177        RC I
178        X = Y
179        GTO 1
180        ISZ
181        RCL (i)
182        PAUSE
183        GTO 8
184        LBL b
185        PI
186        +
187        STO E
188        GTO b
189        LBL d
190        RCL 8
191        ABS
192        LBL D
193        DSP 2
194        RND
195        LAST X
196        X NE Y
197        GTO c
198        X < 0
199        GTO c
200        X = 0
201        GTO c
202        STO 8
203        RTN
204        LBL e
205        CLX
206        STO 9
207        LBL E
208        DSP 2
209        RCL 9
210        RTN
That's it. Enjoy!