Post Reply 
Ok, please look over the HP 41 Yahtzee game here
01-24-2016, 12:36 AM
Post: #2
RE: Ok, please look over the HP 41 Yahtzee game here
Here's the code for the game. Note that the NOT EQUAL character is shown as != in this listing.

Code:
LBL "YZ"
CLRG
"SEED?"
PROMPT
STO 00
LBL 16
.02
LBL 14
CF IND X
ISG X
GTO 14
14.018
STO 23
FIX 00
CF 29
LBL 15
12345
GTO 71
LBL 17
1
ST+ 19
RCL 19
3
X<=Y?
GTO 22
>" ROLL?"
LBL 27
CLX
PROMPT
INT
X<0?
GTO 27
X=0?
SF 00
X=0?
GTO 61
LBL 71
10
/
ENTER
INT
X<>Y
FRC
10
*
X=0?
GTO 20
5
X<>Y
X>Y?
GTO 72
X<>Y
RDN
13
+
RCL 00
997
*
FRC
STO 00
6
*
1
+
INT
STO IND Y
LBL 72
RCL Z
GTO 71
LBL 20
XEQ 40
LBL 61
CLA
ARCL 14
ARCL 15
ARCL 16
ARCL 17
ARCL 18
FS?C 00
GTO 22
GTO 17
LBL 65
ABS
RCL 12
X=0?
GTO 61
RDN
RCL 14
RCL 18
X=Y?
SF 20
RCL Z
GTO 64
LBL 22
>" SCORE?"
LBL 66
CLX
CF 20
PROMPT
INT
13
X<>Y
X>Y?
GTO 66
X=0?
GTO 25
X<0?
GTO 65
FS? IND X
GTO 66
LBL 64
STO 21
RCL 23
STO 22
CLX
STO 19
STO 20
XEQ IND 21
CF 00
"ROW "
ARCL 21
>"="
ARCL 20
AVIEW
RCL 20
STO IND 21
SF IND 21
X!=0?
FC?C 20
GTO 63
2
10^X
ST+ 12
>" "
ARCL X
PSE
AVIEW
PSE
LBL 63
CLX
STO 20
1.013
LBL 75
FC? IND X
GTO 15
ISG X
GTO 75
"DONE"
AVIEW
RCL 01
RCL 02
RCL 03
RCL 04
+
+
+
RCL 05
+
RCL 06
+
"TOP="
ARCL X
>"+"
63
X<=Y?
35
X>Y?
0
ARCL X
X<>Y
RDN
+
AVIEW
PSE
RCL 07
RCL 08
RCL 09
+
+
RCL 11
+
RCL 12
+
RCL 13
+
"LOWER="
ARCL X
AVIEW
PSE
+
"END="
ARCL X
PROMPT
GTO 16
LBL 25
CLA
1.013
LBL 00
FC? IND X
ARCL X
FC? IND X
>","
ISG X
GTO 00
AVIEW
PSE
GTO 61
LBL 01
LBL 02
LBL 03
LBL 04
LBL 05
LBL 06
RCL IND 22
RCL 21
X=Y?
ST+ 20
ISG 22
GTO 06
RTN
LBL 13
FS?C 14
RTN
RCL 14
RCL 15
RCL 16
RCL 17
+
+
+
RCL 18
+
STO 20
RTN
LBL 12
RCL 18
RCL 14
X!=Y?
RTN
BEEP
50
STO 20
RTN
LBL 07
RCL 14
RCL 16
X=Y?
GTO 13
RCL 18
X=Y?
GTO 13
RCL 17
RCL 15
X=Y?
GTO 13
RTN
LBL 08
RCL 14
RCL 17
X=Y?
GTO 13
RCL 15
RCL 18
X=Y?
GTO 13
RTN
LBL 09
SF 14
XEQ 07
FS?C 14
RTN
RCL 14
RCL 15
X!=Y?
RTN
RCL 17
RCL 18
X!=Y?
RTN
25
STO 20
RTN
LBL 11
RCL 23
+
LBL 35
RCL IND X
ISG Y
RCL IND Y
1
-
-
X!=0?
RTN
RDN
18
X<=Y?
GTO 36
RDN
GTO 35
LBL 36
40
STO 20
RTN
LBL 10
17.013
RCL 18
10^X
LBL 50
RCL IND Y
10^X
+
DSE Y
GTO 50
X<>Y
LBL 51
SIGN
10^X
/
RCL X
1111
X>Y?
GTO 53
-
LOG
FRC
X!=0?
GTO 51
LBL 53
X!=0?
RTN
30
STO 20
RTN
LBL 40
DEG
RCL 17
RCL 16
RCL 15
RCL 14
X>Y?
RAD
X>Y?
X<>Y
STO 14
RDN
X>Y?
RAD
X>Y?
X<>Y
STO 15
RDN
X>Y?
RAD
X>Y?
X<>Y
STO 16
RDN
RCL 18
X<Y?
RAD
X<Y?
X<>Y
STO 18
X<>Y
STO 17
FS? 43
GTO 40
END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Ok, please look over the HP 41 Yahtzee game here - Gene - 01-24-2016 12:36 AM
New version of Yahztee game - Gene - 01-26-2016, 09:33 PM



User(s) browsing this thread: 5 Guest(s)