The Museum of HP Calculators


Game of 21 (Blackjack) for the HP-67

This program is Copyright © 1976 by Hewlett-Packard and is used here by permission. This program was originally published in the HP-67 Games Pac 1.

This program is supplied without representation or warranty of any kind. Hewlett-Packard Company and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Card Labels
Game of 21 (Blackjack)
Shift Shuffle   New Player   (next card)
Label Bet→ Hit Stand 11 for Ace 1 for Ace
Key A B C D E

Overview

You make your bet, and the calculator, as dealer, deals two cards to you and two to itself. You see the dealer's first card face up, then his second face down (the calculator shows 0). Your two cards are then shown face up, one at a time. Next, you see a number in the form XXX.YY, where XXX is your bet and YY is the number of points in your hand.

You and the dealer may draw additional cards. Your goal is to finish with a hand whose total count is 21 or below, but closer to 21 than the dealer's. If your hand totals over 21, you lose (you're "busted").

The King is indicated by 13, the Queen by 12, and the Jack by 11, but all count 10 points each. The other cards always count their face values except the Ace. The Ace counts 1 unless you decide to change it to an 11 (press D ). (If you have chosen 11 for an Ace, and want it counted 1, press E.). If the next card you draw makes your score over 21, the calculator will automatically check for an Ace and make it count 1 if you have chosen 11 for its value. Note that an Ace always counts 1 for the dealer, except for a blackjack. A blackjack is a 2 card hand totalling 21, made up of a 10, Jack, Queen, or King plus an Ace with a value of 11. Your best win is a blackjack, since you win 1.5 times your bet rather than the bet itself. If both you and the dealer get blackjack, you neither win nor lose, it's a "push."

After the initial deal, and provided neither you nor the dealer have blackjack, you may ask the dealer to give you another card ("hit") by pressing B. If you don't want to draw, you may "stand" by pressing C. The calculator will then show the dealer's two cards. If the dealer's (calculator's) hand counts 16 or less, it draws. It continues to draw until its hand totals 17 or more, then it stands.

The calculator then determines if you've won or lost, and blinks your winnings (XXX) or losses (-XXX) and your final score (YY) in the form XXX.YY.

Next it shows your total account (the sum of your winnings and losses for all the games you've played this session).

Terms for HP-67/97 Game of 21 (Blackjack)

  1. BLACKJACK: Any Ace (1) with 10, Jack (11), Queen (12) or King (13).
  2. BUST: When your points are 22 or more.
  3. HIT: Signify that you wish another card by pressing B.
  4. STAND: You wish no more cards. Press C.
  5. PUSH: You have the same points as HP-67/97. Blinking 0.000000000 when both have blackjack: blinking 0.00 for ordinary push

Instructions

Step Instructions Input Data/Units Keys Output Data/Units
1 Load side 1 and side 2.      
2 Shuffle cards.   f  A  
3 Stop shuffle and cut deck.   R/S Ignore output
4 Input your bet (whole even dollars only - no cents nor odd dollars). Please do not bet over $100,000,000. Bet A Dealer's cards;
        your cards;
        Bet.points.
5 Hit (draw a card).   B Bet.points.
6 Repeat step 5 until you are busted or you want to stand.      
7 If you want your Ace scored as 11:   D Bet.points.
8 If you want your Ace changed from 11 to 1:   E Bet.points.
9 Stand   C Win or Loss
10 If you had not chosen to stand, what would have bean your next card?   f  E Card
11 For a new game, go to step 2.      
12 For a new player: Reset account to zero, and go to step 11.   f  C 0.00

Example

Load sides 1 and 2.

Keystrokes             Outputs
f A                            Display will not stabilize
                               until R/S is pressed.

Wait 20 or 30 seconds.
R/S                            Ignore output

To reproduce the example
below, store .9103987 
in register E

100 A                   9. *** Dealer's 1st card
                        0. *** Dealer's 2nd card (face down)
                       12. *** Your 1st card is a Queen,
                               worth 10 points.

                        7. *** Your 2nd card

                    100.17     100 is your bet,
                               17 is your score.
B                       4. *** Your 3rd card
                    100.21     Bet. Score
C                       9. *** Dealer's 1st card
                        7. *** Dealer's 2nd card
                       12. *** Dealer's 3rd card
                    100.21     Your win. Score display 
                               blinks to indicate end 
                               of game. Positive number 
                               means you win.
                    100.00     Your account
100 A                   6. *** Dealer's 1st card
                        0. *** Dealer's 2nd card
                        1. *** Your 1st card
                        7. *** Your 2nd card
                        100.08 Your bet. score
D                       100.18 Your bet. score

Your Ace is now counted
as 11.  You decide to 
stand.

C                       6. *** Dealer's 1st card
                       12. *** Dealer's 2nd card
                        4. *** Dealer's 3rd card
                  -100.18      Your loss. score
                     0.00      Your account

Dealer's 20 beats your 18, so you lose the $100 you won the first game. Care to try your luck again?

***Shown by PRINT on HP-97 and by PAUSE on HP-67.

The Program

LINE  KEYS
001  *LBL A
002   PRT SPC
003   PRT SPC
004   CF 0
005   CF 1
006   STO A
007   1
008   STO I
009   GSB 0
010   STO B
011   GSB 5
012   GSB 9
013   STO 1     Bet,
014   STO 3
015   1         New game
016   STO I
017   GSB 0
018   STO C
019   GSB 9
020   STO 2
021   STO + 3
022   0
023   GSB 5
024   PRT SPC
025   GSB e
026   STO 5
027   STO 7
028   GSB e
029   STO 6
030   STO + 7
031   RCL 5
032   ×
033   RCL 7
034   +
035   2
036   1
037   STO 0
038   X=Y?
039   GTO 2
040   RCL 7
041   GSB 3
042   R/S
043  *LBL B
044   GSB e
045   STO + 7
046   RCL 7
047   RCL 0
048   X⇔Y       Hit
049   X>Y?
050   GTO 4
051   X≤Y?
052   GSB 3
053   R/S
054  *LBL D
055   SF 0
056   1
057   0
058   STO + 7   11 for Ace
059   RCL 7
060   GSB 3
061   RTN
062  *LBL E
063   CF 0
064   1
065   0
066   STO - 7   1 for Ace
067   RCL 7
068   GSB 3
069   RTN
070  *LBL 4
071   F0?
072   GTO E
073   RCL A
074   CHS
075   STO + 9   Player lose
076   RCL 7
077   EEX
078   2
079   ÷
080   -
081   GTO 6
082  *LBL 2
083   RCL 1
084   RCL 2
085   ×
086   RCL 3     HP Blackjack?
087   +
088   RCL 0
089   X=Y?
090   GTO 7
091   F1?
092   RTN
093  *LBL 8
094   .
095   2
096   1
097   RCL A     Player Blackjack!
098   1
099   .
100   5
101   ×
102   STO A
103   STO + 9
104   +
105  *LBL 6
106   PAUSE
107   PAUSE
108   PAUSE
109   PAUSE     Display with blinks
110   RCL 9
111   DSP 2
112   F1?
113   R/S
114   RTN
115  *LBL 7
116   F1?
117   GTO 4
118   0         HP Blackjack!
119   DSP 9
120   GTO 6
121  *LBL 9
122   1
123   0
124   X⇔Y       10 for J, Q, K
125   X≤Y?
126   RTN
127   X⇔Y
128   RTN
129  *LBL 3
130   EEX
131   2         Display Bet.point
132   ÷
133   RCL A
134   +
135   RTN
136  *LBL 5
137   DSP 0
138   PRTX      Print
139   DSP 2
140   RTN
141  *LBL a
142   0
143   STO I
144   .
145   5
146   2
147   8
148   1
149   1
150   6
151   3
152   STO E
153  *LBL 0     Shuffle
154   RCL E
155   9
156   9
157   7
158   ×
159   FRAC
160   STO E
161   1
162   3
163   ×
164   INT
165   1
166   +
167   STO D
168   DSZ I
169   GTO 0
170   RTN
171  *LBL C
172   CF 0
173   PRT SPC
174   RCL B
175   GSB 5
176   RCL C
177   GSB 5
178   SF 1
179   GSB 2
180   CF 1
181   RCL 3     Stand and
182  *LBL b
183   1         HP takes cards
184   7
185   X≤Y?
186   GTO d
187   GSB e
188   STO + 3
189   RCL 3
190   2
191   2
192   X≤Y?
193   GTO 1
194   RCL 3
195   GTO b
196  *LBL d
197   RCL 7
198   RCL 3
199   -
200   X=0?
201   GTO 6
202   X<0?
203   GTO 4
204  *LBL 1
205   RCL A
206   STO + 9
207   RCL 7
208   GSB 3
209   GTO 6
210  *LBL e
211   1
212   STO I
213   GSB 0     Next card
214   GSB 5
215   GSB 9
216   RTN
217  *LBL c
218   0         New player
219   STO 9
220   RTN

Register Use

R0  21
R1  1st D
R2  2nd D
R3  ΣD
R5  1st P
R6  2nd P
R7  ΣP
R9  ΣBet
A   Bet
B   1st D
C   2nd D
D   last Ki
E   ui
I   Index

Go back to the software library
Go back to the main exhibit hall