HP-41/42 Game of Skunk!
Back to main page If this is useful to you, Email me at: Genewright143@hotmail.com
Having recently sold my HP-48, I miss a few things. One of them is a game called "SKUNK". So, I did the next best thing: I wrote a version for the HP-41! I based it on what I remembered from the SKUNK game for the HP-48 originally written by Doug Cannon. Thanks to Doug. If you have an HP-48 and haven't played Doug's version, do so. The game and graphics are quite fun.

I've been working on this game for over 15 months, so I've found most (hopefully) of the bugs. Bug reports would be welcome, as I intend to support this game for those interested. As of 5/14/97, it's 422 bytes long (fits on two mag cards) and 222 lines. The game is fairly long so if you don't want to key it in, email me to get my mailing address and I'll send copies of the program either on bar code or two magnetic cards you provide for $5. (That's not designed to make me rich!) If you type it in and like it, drop me an email! HP-42 owners, of course, will have to key the game in anyway. :-(

Description: SKUNK is a 2 dice game of part strategy, part luck. I am unaware of the author of the original idea for the game, I think the game is ancient.

The game begins by asking you to enter a decimal seed. Then you are asked to enter the goal in points. 100 is the default if no entry is made, and trying to get to 200 is relatively hard. Then you are asked if HP should go first or yourself. Pressing R/S without an entry makes you go first. To make HP go first, type the letter Y. When it is your turn, flag 1 is set. When HP is playing, flag 2 is set. NOTE: Flags 1 and 2 do NOT determine who is player #1 or player #2. They are just a convenient way to indicate whether it's you that's playing or HP. Sorry if that turns out to be a little confusing, but....

At this point you begin play. Player #1 rolls first, and his options are to Roll or Pass. By pressing the A key, the dice are rolled, and by pressing the E key you may pass. The object is to roll as many times as you can without getting "Skunked". One is "Skunked" when a one is rolled on either die. If no ones are rolled, then the sum of the two dice is added to the pot. If you are "Skunked" then you lose your turn and the pot goes to zero. If you choose to pass at some time, then the current pot is added to your score. The pot then returns to zero, and the play passes to the next player.

It is extremely disastrous to be "Double Skunked". This is, of course, when a one is rolled on each die. At this point, the pot goes to zero, your score goes to zero, and you lose your turn. This is most undesirable.

The status of the game is shown in the display as:
0,0: PP YY HP or 0,0: PP HP YY
depending on if it's your turn or HP's, and where PP is the point total in the "Pot", YY is your point total (assuming it's your turn), and HP is the HP's point total.

Now, it is only fair that everyone get the same amount of turns, so if player #1 should reach or pass the goal score, then player #2 has one more turn to pass the score of player #1. Thus, if both players reach the destination score, the winner is the player with the highest score. You can see the advantages to being player #2. If player #2 reaches the destination score, and player #1 has not yet reached it, player #2 wins immediately.

If both players reach the destination score and are tied, then HP wins. This game is actually fairly tough to beat! If you can beat this game more than 6 times out of 10, congratulations! Game play hinges on your willingness to risk the points in the pot to roll again. Enjoy!


Here's a sample game:
See:          Press: (Comments in brackets)

              XEQ "SKK" (Remember to clear flag 26 for a quiet game)

SEED?         0.987654321 R/S
GOAL?         R/S (We'll play to 100, the default)
HP 1ST?       N R/S (We'll go first and let HP have the final turn)

0,0:0 0 0     A (Press A or the Sigma+ key (HP-41) or XEQ A (HP-42)
5,2:7 0 0     A (A total of 7 points is in the pot)
1,6:14 0 0    
SKUNK         (A 1 showed up, so I got skunked. It's HP's turn now)

3,6:9 0 0
1,6:16 0 0    
SKUNK         (HP got skunked on it's second roll. My turn again)

0,0:0 0 0     A
3,4:7 0 0     A
6,6:19 0 0    E (I'll hold onto the 19 points, so I'll pass to the HP)

3,3:6 0 19
1,6:13 0 19   
SKUNK         (HP got skunked again. Notice my 19 points got moved)

0,0:0 19 0    A
4,2:6 19 0    A
1,6:13 19 0   
SKUNK         (I got skunked again)

2,6:8 0 19
2,1:11 0 19   
SKUNK         (HP got skunked again)

0,0:0 19 0    A
6,4:10 19 0   A
3,3:16 19 0   A
2,2:20 19 0   A
6,4:30 19 0   E (I'll keep the 30 add'l points)

2,2:4 0 49
6,1:11 0 49   
SKUNK         (HP continues to get skunked. Maybe I'll win 100 to 0?)

0,0:0 49 0    A
3,6:9 49 0    A
3,4:16 49 0   E (I'll keep the 16 add'l points)

4,1:5 0 65    
SKUNK         (HP sure is getting skunked alot)

0,0:0 65 0    A
4,2:6 65 0    A
4,3:13 65 0   E (I'll keep the 13 points)

3,4:7 0 78
5,1:13 0 78   
SKUNK         (Skunked again! Will HP ever score?)

0,0:0 78 0    A
1,5:6 78 0    
SKUNK         (Now I got skunked)

6,1:7 0 78    
SKUNK         (HP is skunked again)

0,0:0 78 0    A
3,2:5 78 0    E (I want HP to score sometime!)

5,1:6 0 83    
SKUNK         (Oh well)

0,0:0 83 0    A
1,3:4 83 0   
SKUNK         (Depending on starting seed, you can have lots of skunks!)

5,4:9 0 83
4,5:18 0 83
5,3:26 0 83   (How about that! HP scored!)

0,0:0 83 26   A (I'll go for the kill now!)
5,6:11 83 26  A
6,5:22 83 26  E (I'll be over 100 points now, so HP has to beat me!)

3,5:8 26 83
1,2:3 26 83   (Oh well)
SKUNK
You win
Y:105 HP:26

Program Listing

A few lines of the program below might need some explanation. The symbols "->" means APPEND alpha characters. When you see X NE Y? that is X is not equal to Y? RDN is roll down. Line 80 is append 1 space. So is line 86.

X-functions are used in only a few places. The X<>F instruction is used to set/clear flags in lines 5, 32, and 153. ATOX is used in line 22. If someone wants a version that doesn't use these, email me. It doesn't take much extra programming to mimic what these would do, if you have a vintage HP-41C, for example. Otherwise, use the X-functions. ;-)

Technical specs: This game requires Size of 008 and uses flags 0, 1, 2, 6, 7, and 10. Memory 0 holds the random number seed. Memories 1 and 2 hold the two dice. Memory 3 holds the sum of the two dice. Memory 4 holds the human's score while memory 5 holds the HP's score. Memory 6 holds the goal point total being played to. Memory 7 is a counter used to determine HP's move (that I could probably get rid of if I did a proper analysis of the stack! Well, there's only so many hours in the day!)

Line      Instruction
01         LBL "SKK"
02         LBL 07
03         SF 27
04         CLX
05         X<>F
06         CF 10
07         FIX 0
08         CF 29
09         "SEED?"
10         PROMPT
11         CLRG
12         STO 00
13         "GOAL?"
14         2
15         10^X
16         PROMPT
17         STO 06
18         "HP 1ST?"
19         AON
20         STOP
21         AOFF
22         ATOX
23         89
24         X=Y?
25         GTO 20
26         SF 10
27         LBL 99
28         CLX
29         STO 01
30         STO 02
31         STO 03
32         X<>F
33         SF 01
34         XEQ C
35         TONE 9
36         STOP
37         LBL A
38         XEQ 00
39         TONE 9
40         FS? 06
41         GTO 13
42         FS? 07
43         GTO 09
44         RTN
45         GTO A
46         LBL 13
47         FS? 07
48         GTO 10
49         LBL 09
50         XEQ 14
51         FS? 10
52         GTO 20
53         RCL 06
54         RCL 05
55         X < Y?
56         GTO 20
57         RCL 04
58         X > Y?
59         GTO 90
60         LBL 98
61         "TOO BAD"
62         AVIEW
63         TONE 3
64         TONE 1
65         LBL 08
66         PSE
67         "Y:"
68         ARCL 04
69         ->" HP:"
70         ARCL 05
71         PROMPT
72         GTO 07
73         LBL C
74         CLA
75         ARCL 01
76         ->","
77         ARCL 02
78         ->":"
79         ARCL 03
80         ->" "
81         RCL 04
82         RCL 05
83         FS? 01
84         X<>Y
85         ARCL X
86         ->" "
87         ARCL Y
88         AVIEW
89         RTN
90         LBL 10
91         PSE
92         "DOUBLE SKUNK"
93         AVIEW
94         TONE 0
95         TONE 0
96         FS?C 00
97         GTO 90
98         CLX
99         FS? 02
100        STO 05
101        FC?C 01
102        GTO 99
103        STO 04
104        GTO 20
105        LBL E
106        RCL 03
107        ST+ 04
108        RCL 04
109        RCL 06
110        X < = Y?
111        SF 00
112        FS? 10
113        GTO 20
114        FC? 00
115        GTO 20
116        LBL 90
117        "YOU WIN"
118        AVIEW
119        BEEP
120        GTO 08
121        LBL 00
122        XEQ 00
123        STO 01
124        XEQ 00
125        STO 02
126        1
127        X=Y?
128        SF 07
129        RCL 01
130        X=Y?
131        SF 06
132        RCL 02
133        +
134        ST+ 03
135        GTO C
136        LBL 00
137        RCL 00
138        997
139        *
140        FRC
141        STO 00
142        6
143        *
144        1
145        +
146        INT
147        RTN
148        LBL 20
149        CLX
150        STO 03
151        FS? 00
152        1
153        X <> F
154        SF 02
155        3
156        STO 07
157        LBL 06
158        XEQ 00
159        FS? 06
160        GTO 11
161        FS? 07
162        GTO 04
163        TONE 7
164        PSE
165        RCL 03
166        RCL 05
167        +
168        RCL 06
169        X<=Y?
170        GTO 05
171        FS? 00
172        GTO 06
173        RCL 07
174        3
175        X NE Y?
176        GTO 02
177        RCL 06
178        RCL 04
179        -
180        10
181        X>Y?
182        GTO 02
183        RCL 03
184        X > Y?
185        GTO 03
186        LBL 02
187        DSE 07
188        GTO 06
189        LBL 03
190        FS? 00
191        GTO 06
192        RCL 03
193        ST+ 05
194        GTO 99
195        LBL 05
196        RDN
197        STO 05
198        FC? 10
199        GTO 99
200        RCL 04
201        X < = Y?
202        GTO 98
203        RCL 03
204        ST- 05
205        GTO 06
206        LBL 11
207        FS? 07
208        GTO 10
209        LBL 04
210        XEQ 14
211        FC? 10
212        GTO 99
213        FS? 00
214        GTO 90
215        GTO 99
216        LBL 14
217        PSE
218        "SKUNK"
219        AVIEW
220        TONE 7
221        TONE 0
222        END

Visitors since 5/15/97