The Museum of HP Calculators


Nim_k for the HP-41C/CV/CX

This program is Copyright © HP and is used here by permission. It was originally printed in the HP-67 Games Pac 1. This program was ported to the HP-41C by reading with the HP-41C card reader and the card reader may be required for operation of this program. This program was entered and uploaded by Tony Duell. The Barcode for this program was provided by Brian Ward.

This program is supplied without representation or warranty of any kind. Tony Duell, Hewlett Packard 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.

Documentation Information (CD or source code)
How to get this Program to your Calculator (via HP-IL, disk, wand, and fingers)
Download Binary (.raw) program for disk or PC HP-IL Card download
Download Hexadecimal (.dat) program for Serial Port download
Display the Program Barcode (.pdf) for printing and scanning

Program Listing

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

Go back to the HP-41 software library
Go back to the general software library
Go back to the main exhibit hall