The Museum of HP Calculators


GCD, LCM, Dec to Frac 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 Math 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.

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

Program Listing

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

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