Back to main page |
**Email me at:**
Gene!

The program presented below will play the game of Blackjack on the HP-25 and HP-25C. It was written by Mike Garland and appeared in the V5N4P23 issue of PPC Journal (May 1978). Thanks to Mike wherever he is today!

This program, due to the small 49 step HP-25 program memory, puts a few requirements on you that you wouldn't find on a blackjack program for a more powerful programmable, but it is still amazing to see the old HP-25 work like this.

**Instructions: **

1) Load the program into the calculator and change back to RUN mode.
Then press f REG to clear all memories.

2) Store the initial constants needed by the program: 10, STO 4, 21 STO
3.

3) Enter the initial random number seed (a decimal between 0 and 1) and
press STO 5.

4) Enter your starting bankroll and press STO 7.

5) To play a game, press f PRGM, key in your bet and press R/S.

6) Your card will be displayed. Continue pressing R/S until you decide
to stay or your total goes over 21.

7) If you bust, press R/S and your bet will be displayed as a negative
number and then your balance will be displayed.

8) If you decide to stay, press STO 0, R/S and the machine's cards will
be displayed successively. The machine will continue to take cards until
it wins or busts.

9) If you win, your bet will be displayed as a positive number and then
your balance will be displayed.

10) If you lose, your bet will be displayed as a negative number and
then your balance will be displayed.

11) For a new game, go to step 5.

**Notes: **

The machine wins all ties.

The machine takes all aces as 1's NOT 11's.

You have the option of making your aces (displayed as 1's) into 11's by
pressing X <> Y, STO+ 1, when your card is displayed.

If you get 21, you win automatically, just press R/S.

**Sample Game: **

Enter the following: 0.7 STO 5, 10 STO 4, 21 STO 3, 25 STO 7.

Enter 5 for your bet and press f PRGM, then R/S.

A 5 is displayed (your first card). Press R/S for the second card.

A 3 is displayed (your second card for a total of 8). Press R/S for
another card.

A 1 is displayed. You decide to take this ace as an 11, so press X <> Y,
then STO+ 1.

This makes your total 19, so you decide to stay. Press STO 0. Then press
R/S. (It's HP's turn now).

HP's first card is shown as an 8 (this is paused), then an 8 for its
second card (HP's total is now 16), the third card displayed is a 10.
Hurray! HP busted!

A 5 is displayed (this shows your bet) and then your bankroll is shown
as a 30 (25 + 5). To play again, just press R/S and continue as above.

**Program Listing:** Email if you have any questions.

Line Instruction 01 f FIX 0 02 STO 6 03 CLX 04 STO 0 05 STO 1 06 STO 2 07 RCL 5 08 g SIN-1 09 g FRAC 10 STO 5 11 1 12 4 13 * 14 f INT 15 g X = 0 16 GTO 07 17 RCL 4 18 f X > = Y 19 X <> Y 20 RCL 0 21 g X NE 0 22 GTO 33 23 RDN 24 STO+ 1 25 R/S 26 RCL 1 27 RCL 3 28 f X < Y 29 GTO 43 30 f X = Y 31 GTO 46 32 GTO 07 33 RDN 34 f PAUSE 35 STO+ 2 36 RCL 1 37 RCL 2 38 f X < Y 39 GTO 07 40 RCL 3 41 f X < Y? 42 GTO 46 43 RCL 6 44 CHS 45 GTO 47 46 RCL 6 47 STO+ 7 48 f PAUSE 49 RCL 7

That's it!