Craps Game for the HP-19C and HP-29C

Back to main page | Email me at: Gene!


The program presented below will play the game of Craps on the HP-19C or HP-29C. It was written by Mike Richter and appeared in the V5N6P15 issue of PPC Journal (July 1978). Thanks to Mike wherever he is today!

I have made a few modifications to his original program (primarily changing which memories are used), but these are not significant.


Instructions:
1) Initialize with a decimal seed between 0 and 1, press GTO .00 and then R/S.
2) To place a bet, key in the amount of the bet and press GSB 9.
3) To roll the dice, press GSB 0. The display will show the faces of two dice separated by a decimal point and the shooter's point goal as the exponent.
4) After a win or a loss, the display will show the amount of the bet and then stop showing the current winnings (or losses).

Program Listing: I have not provided the keycodes that are shown because they will be different on the HP-19C or the HP-29C depending on which machine you key this into. Email if you have any questions.


Line      Instruction
01         CLRG
02         X = 0?
03         1/X
04         STO 6
05         LBL 8
06         RCL 6
07         9
08         9
09         7
10         *
11         FRC
12         STO 6
13         6
14         *
15         1
16         +
17         INT
18         ST0+ 0
19         RTN
20         LBL 0
21         SCI 1
22         CLX
23         STO 00
24         GSB 8
25         STO 1
26         GSB 8
27         1
28         0
29         /
30         STO+ 1
31         RCL 5
32         X = 0?
33         GTO 1
34         RCL 0
35         X = Y?
36         GTO 3
37         7
38         X NE Y?
39         GTO 4
40         LBL 2
41         RCL 1
42         CHS
43         STO 1
44         LBL 3
45         GSB 4
46         PSE
47         CLX
48         STO 5
49         FIX 2
50         RCL 4
51         RCL 1
52         X > 0?
53         GTO 6
54         RDN
55         CHS
56         X <> Y
57         LBL 6
58         RDN
59         PSE
60         STO+ 3
61         RCL 3
62         RTN
63         LBL 1
64         RCL 0
65         STO 5
66         9
67         -
68         ABS
69         2
70         X = Y?
71         GTO 3
72         3
73         RCL 0
74         4
75         /
76         INT
77         X NE 0?
78         X = Y?
79         GTO 2
80         LBL 4
81         RCL 5
82         10^X
83         RCL 1
84         *
85         RTN
86         LBL 9
87         RCL 6
88         RCL 3
89         CLRG
90         STO 3
91         RDN
92         STO 6
93         RDN
94         STO 4
95         RTN

That's it. Enjoy!