conversion .mod file to RAW

General discussion about calculators, Swiss Micros or otherwise
dlachieze
Posts: 137
Joined: Thu May 04, 2017 10:20 am
Location: France

Re: conversion .mod file to RAW

Post by dlachieze » Sat Feb 17, 2018 10:29 pm

grsbanks wrote:
Sat Feb 17, 2018 10:10 pm
Can you point me to the .raw file in question and I'll investigate.
I ran the following command under the Win10 PowerShell:

Code: Select all

.\rom2raw NavL-1B.rom NavU-1B.rom

It generated the file : NAVIG_1B.raw
NAVIG_1B.zip
(4.57 KiB) Downloaded 29 times

When imported in the DM42 encoder/decoder I get the following error message: Illegal number component at PC:0020
and only the first 5 steps are decoded:

Code: Select all

00 { 30-Byte Prgm }
01▸LBL "NA"
02 XEQ "D+T"
03▸LBL "*NA"
04 "SD OR HP=?"
05 PROMPT
Here is the ouput of the rom2raw conversion, only the first page was converted, the second page was skipped. I don't know if this is normal or not:

Code: Select all

PS C:\Users\[...]\HP 42s\Tools> .\rom2raw NavL-1B.rom NavU-1B.rom
Input files: NavL-1B.rom NavU-1B.rom
Output file: NAVIG_1B.raw
ROM Name: NAVIG 1B
ROM Size: 8192 (0x2000), 2 pages
--- Page 0 ---
ROM Number: 14
62 functions (XROM 14,00 - 14,61)
XROM 14,00: dummy entry NAVIG 1B
XROM 14,01: user code "NA"
XROM 14,02: user code "*NA"
XROM 14,03: user code "STAR"
XROM 14,04: user code "*STAR"
XROM 14,05: user code "SUN"
XROM 14,06: user code "*SUN"
XROM 14,07: user code "*SUNL"
XROM 14,08: user code "*SUNU"
XROM 14,09: user code "MOON"
XROM 14,10: user code "*MOON"
XROM 14,11: user code "*MOONU"
XROM 14,12: user code "*MOONL"
XROM 14,13: user code "VENUS"
XROM 14,14: user code "*VENUS"
XROM 14,15: user code "P"
XROM 14,16: user code "MARS"
XROM 14,17: user code "*MARS"
XROM 14,18: user code "JUPITER"
XROM 14,19: user code "*JUPIT"
XROM 14,20: user code "SATURN"
XROM 14,21: user code "*SATUR"
XROM 14,22: user code "SRT"
XROM 14,23: user code "*SRT"
XROM 14,24: user code "JD"
XROM 14,25: user code "D+T"
XROM 14,26: user code "LBRYZX"
XROM 14,27: user code "ZYXdHA"
XROM 14,28: user code "DSPHAd"
XROM 14,29: user code "*IN"
XROM 14,30: user code "*IN1"
XROM 14,31: user code "*DMT"
XROM 14,32: user code "*DMS"
XROM 14,33: user code "*HR"
XROM 14,34: user code "*T"
XROM 14,35: user code "FA"
XROM 14,36: user code "GST"
XROM 14,37: user code "BODY"
XROM 14,38: user code "*BODY"
XROM 14,39: user code "SIGHT"
XROM 14,40: user code "RM"
XROM 14,41: user code "DR"
XROM 14,42: user code "*DR"
XROM 14,43: user code "GCPOS"
XROM 14,44: user code "*GCPOS"
XROM 14,45: user code "GC"
XROM 14,46: user code "*GC"
XROM 14,47: user code "GCPLAN"
XROM 14,48: user code "*GCPLAN"
XROM 14,49: user code "GCPLOT"
XROM 14,50: user code "*GCPLOT"
XROM 14,51: user code "DSPP2"
XROM 14,52: user code "LOTOL"
XROM 14,53: user code "*LOTOL"
XROM 14,54: user code "DSPL"
XROM 14,55: user code "DSPLO"
XROM 14,56: user code "RLPOS"
XROM 14,57: user code "*RLPOS"
XROM 14,58: user code "RL"
XROM 14,59: user code "*RL"
XROM 14,60: user code "*M/a"
XROM 14,61: user code "*ec"
--- Page 1 ---
ROM Number: 14
Bad function count (0), skipping this page.
DM42 SN: 00425

Thomas Okken
Posts: 486
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Sat Feb 17, 2018 11:57 pm

The next line, which the DM42 decoder apparently chokes on, is the number 60. Nothing weird there, but: on the HP-42S, every number line is followed by a null byte, while on the 41, those trailing null bytes are only required to separate consecutive number lines. I'm guessing the decoder expects that null, and in the rom2raw-generated file, it isn't there. (And if you import that file into Free42 and then export it, that null is there: Free42 accepts HP-41 raw files (*) but exports code according to 42S conventions.)

Regarding the "bad function count" message: rom2raw is complaining that the upper page has an empty page directory, but it looks like there isn't an actual problem. The raw file is a bit under 8 kilobytes, which seems about right for a two-page user-code-only ROM that isn't quite full.

(*) Actually, Les Wright just told me that Free42 doesn't handle certain synthetic HP-41 number lines, which is probably due to changes in number parsing in Free42 Decimal >= 1.5 (Intel floating-point library based). Fortunately, you're unlikely to find synthetics in HP-made ROMs. :)

grsbanks
Posts: 703
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: conversion .mod file to RAW

Post by grsbanks » Sun Feb 18, 2018 9:47 am

Thomas Okken wrote:
Sat Feb 17, 2018 11:57 pm
The next line, which the DM42 decoder apparently chokes on, is the number 60. Nothing weird there, but: on the HP-42S, every number line is followed by a null byte, while on the 41, those trailing null bytes are only required to separate consecutive number lines. I'm guessing the decoder expects that null, and in the rom2raw-generated file, it isn't there. (And if you import that file into Free42 and then export it, that null is there: Free42 accepts HP-41 raw files (*) but exports code according to 42S conventions.)
That'll be it. It uses the null byte to recognize the end of the number.

I'll get that fixed asap.
Not SwissMicros staff, just an enthusiast.

grsbanks
Posts: 703
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: conversion .mod file to RAW

Post by grsbanks » Sun Feb 18, 2018 11:58 am

OK, I've fixed this in my code. It also choked on numbers with an absolute value less than 1 that didn't have the leading '0'. Eg. -0.5 and 0.8 would be fine but with -.5 and .8 it would get its knickers in a twist. It might be a few days before these changes make it to the SwissMicros server. I don't have access to that so either Michael or David has to pull the update and they're both away this week.

I also have to implement "END" instructions correctly in .raw files containing more than one program. As things are now the listing is incorrect but the .raw file is fine. It doesn't make things go belly up in the DM42.
Not SwissMicros staff, just an enthusiast.

Ancient Sailor
Posts: 6
Joined: Thu Feb 15, 2018 7:27 pm
Location: Enkhuizen, The Netherlands

Re: conversion .mod file to RAW

Post by Ancient Sailor » Sun Feb 18, 2018 12:13 pm

[Moderator note -- edited the post so it doesn't take up so much vertical space, placed listing in "code" tags]

Follow up .modfile to Raw

Hi,
This is the translation from the email that i received in the Dutch Language, after my request to help on Thomas Okken, because i am a novice is this type of science.

Hi Rupert,
Rom2raw works in Windows 10, but you have to run it in a Command Prompt. And that is not all; the two modules you sent me are both in formats that rom2raw does not understand. From the first I extracted the ROM files using the MODFile program (downloadable from hp41.org), and for the second I put together a small C-program to convert the LST files into raw dumps. The ROM files thus obtained, and the raw files and listings generated by rom2raw, are attached to this email.
In the listing of the HP Navpac you see a message that rom2raw does not pick up the second page, but I'm not sure if that is really a problem. The length of the raw file seems to be quite right. You have to check whether all global labels that are there are indeed there; otherwise everything seems fine. No machine code, and no other problems.
After that i imported te raw file into DM42 and its seems to look good.

Already test a Great-circle course and distance. with a good result.
example Determine the great-circle distance an initial heading from;
Keyboard input is in Degrees, minute, second ( DMS)
from 33-31-07 N, 118-38-32W to 21-16N 157-44-42W
Keystrokes

step 1 XEQ >ALHA "GC" ENTER
step 2 33.3102 R/S
step3 118.3832 R/S
step 4 21.16 R/S
Step 5 157.4442 R/S
output on screen
D- 2.193.8 NMI ( nautical mile) R/S
HI 260.6

Only the XEQ "GCPLOT" and "GCPOS" give after the input the error" Size error"
on page 9 from the Navigation manual a read that Size 054 is sufficient for programs in this pac.
I have to do more testing on the program. A special the perpetual nautical almanac.
On the HP41.0rg there is a manual for the Navigation pac.

Below the Text file. I received from Thomas Okken, i have received the raw file to.

kind regards , and special thanks to Thomas Okken,

Rupert van Swol

Input files: NavL-1B.ROM NavU-1B.ROM
Output file: navigation.raw
ROM Name: NAVIG 1B
ROM Size: 8192 (0x2000), 2 pages
--- Page 0 ---
ROM Number: 14
62 functions (XROM 14,00 - 14,61)
XROM 14,00: dummy entry NAVIG 1B
XROM 14,01: user code "NA"
XROM 14,02: user code "*NA"
XROM 14,03: user code "STAR"
XROM 14,04: user code "*STAR"
XROM 14,05: user code "SUN"
XROM 14,06: user code "*SUN"
XROM 14,07: user code "*SUNL"
XROM 14,08: user code "*SUNU"
XROM 14,09: user code "MOON"
XROM 14,10: user code "*MOON"
XROM 14,11: user code "*MOONU"
XROM 14,12: user code "*MOONL"
XROM 14,13: user code "VENUS"
XROM 14,14: user code "*VENUS"
XROM 14,15: user code "P"
XROM 14,16: user code "MARS"
XROM 14,17: user code "*MARS"
XROM 14,18: user code "JUPITER"
XROM 14,19: user code "*JUPIT"
XROM 14,20: user code "SATURN"
XROM 14,21: user code "*SATUR"
XROM 14,22: user code "SRT"
XROM 14,23: user code "*SRT"
XROM 14,24: user code "JD"
XROM 14,25: user code "D+T"
XROM 14,26: user code "LBRYZX"
XROM 14,27: user code "ZYXdHA"
XROM 14,28: user code "DSPHAd"
XROM 14,29: user code "*IN"
XROM 14,30: user code "*IN1"
XROM 14,31: user code "*DMT"
XROM 14,32: user code "*DMS"
XROM 14,33: user code "*HR"
XROM 14,34: user code "*T"
XROM 14,35: user code "FA"
XROM 14,36: user code "GST"
XROM 14,37: user code "BODY"
XROM 14,38: user code "*BODY"
XROM 14,39: user code "SIGHT"
XROM 14,40: user code "RM"
XROM 14,41: user code "DR"
XROM 14,42: user code "*DR"
XROM 14,43: user code "GCPOS"
XROM 14,44: user code "*GCPOS"
XROM 14,45: user code "GC"
XROM 14,46: user code "*GC"
XROM 14,47: user code "GCPLAN"
XROM 14,48: user code "*GCPLAN"
XROM 14,49: user code "GCPLOT"
XROM 14,50: user code "*GCPLOT"
XROM 14,51: user code "DSPP2"
XROM 14,52: user code "LOTOL"
XROM 14,53: user code "*LOTOL"
XROM 14,54: user code "DSPL"
XROM 14,55: user code "DSPLO"
XROM 14,56: user code "RLPOS"
XROM 14,57: user code "*RLPOS"
XROM 14,58: user code "RL"
XROM 14,59: user code "*RL"
XROM 14,60: user code "*M/a"
XROM 14,61: user code "*ec"
--- Page 1 ---
ROM Number: 14
Bad function count (0), skipping this page.

Code: Select all

01>LBL "NA"
02 XEQ "D+T"
03>LBL "*NA"
04 "SD OR HP=?"
05 PROMPT
06 60
07 /
08 STO 32
09 CF 07
10 CF 08
11 ABS
12 X=0?
13 GTO 00
14 .2
15 X>Y?
16 SF 08
17 CLX
18 .4
19 X>Y?
20 GTO 01
21 SF 07
22 X<>Y
23 STO 53
24 TAN
25 .2725
26 *
27 ATAN
28 RCL 32
29 SIGN
30 *
31 STO 32
32>LBL 01
33 RCL 34
34 INT
35 FIX 0
36 CF 29
37 RCL 16
38 XEQ 03
39 STO 16
40 RCL 34
41 INT
42 1
43 +
44 FIX 0
45 CF 29
46 RCL 17
47 XEQ 03
48 STO 17
49 RCL 34
50 INT
51 FIX 0
52 CF 29
53 RCL 18
54 XEQ 04
55 STO 18
56 RCL 34
57 INT
58 1
59 +
60 FIX 0
61 CF 29
62 RCL 19
63 XEQ 04
64 STO 19
65 "SUN"
66 FS? 07
67 "MOON"
68 FS?C 08
69 "PLANET"
70 ASTO 48
71 0
72 STO 20
73 GTO 02
74>LBL 00
75 RCL 34
76 INT
77 FIX 0
78 CF 29
79 "GHAY<"
80 ARCL X
81 |-">="
82 RCL 16
83 XEQ "*DMS"
84 |-"?"
85 PROMPT
86 XEQ "*HR"
87 STO 16
88 RCL 34
89 INT
90 1
91 +
92 FIX 0
93 CF 29
94 "GHAY<"
95 ARCL X
96 |-">="
97 RCL 17
98 XEQ "*DMS"
99 |-"?"
100 PROMPT
101 XEQ "*HR"
102 STO 17
103 RCL 20
104 "SHA="
105 XEQ "*DMS"
106 |-"?"
107 PROMPT
108 XEQ "*HR"
109 STO 20
110 RCL 18
111 "DEC="
112 XEQ "*DMS"
113 FS? 05
114 |-"S"
115 FC? 05
116 |-"N"
117 |-"?"
118 PROMPT
119 XEQ "*HR"
120 STO 18
121 STO 19
122 "STAR"
123 ASTO 48
124>LBL 02
125 RCL 34
126 FRC
127 STO 00
128 RCL 17
129 RCL 16
130 -
131 LASTX
132 X<>Y
133 360
134 MOD
135 RCL 00
136 *
137 +
138 STO 45
139 RCL 19
140 RCL 18
141 -
142 LASTX
143 X<>Y
144 RCL 00
145 *
146 +
147 STO 46
148 RCL 20
149 STO 44
150 RTN
151>LBL 03
152 "GHA<"
153 ARCL Y
154 |-">="
155 XEQ "*DMS"
156 |-"?"
157 PROMPT
158 XEQ "*HR"
159 RTN
160>LBL 04
161 "DEC<"
162 ARCL Y
163 |-">="
164 XEQ "*DMS"
165 FS? 05
166 |-"S"
167 FC?C 05
168 |-"N"
169 |-"?"
170 PROMPT
171 XEQ "*HR"
172 END

01>LBL "STAR"
02 CF 06
03 XEQ "D+T"
04 "STAR NO.=?"
05 PROMPT
06 INT
07 STO 47
08 RCL 30
09 XEQ "FA"
10 STO 44
11>LBL "*STAR"
12 XEQ IND 47
13 FS?C 06
14 RTN
15 STO 45
16 X<>Y
17 STO 46
18 RCL 44
19 RCL 34
20 15
21 *
22 -
23 .985647
24 /
25 RCL 34
26 24
27 /
28 -
29 STO 50
30 RCL 45
31 RCL 35
32 .69
33 -
34 1.8
35 /
36 P-R
37 ST+ 46
38 X<> L
39 X<>Y
40 RCL 46
41 TAN
42 *
43 X<>Y
44 2.3
45 *
46 -
47 ST+ 45
48 RCL 28
49 RCL 45
50 -
51 426
52 1/X
53 P-R
54 ST- 46
55 X<>Y
56 RCL 46
57 TAN
58 *
59 ST- 45
60 RCL 28
61 SIN
62 .00479
63 *
64 ST+ 45
65 RCL 45
66 RCL 50
67 -
68 171.4
69 1/X
70 P-R
71 RCL 46
72 COS
73 /
74 ST+ 45
75 X<>Y
76 RCL 46
77 SIN
78 *
79 ST+ 46
80 0
81 STO 32
82 RTN
83>LBL 00
84 "POLARIS"
85 89.1214
86 ENTER^
87 329.3708
88 RTN
89>LBL 01
90 "ALPHERATZ"
91 28.9194
92 ENTER^
93 358.3050
94 RTN
95>LBL 02
96 "ANKAA"
97 -42.4744
98 ENTER^
99 353.8113
100 RTN
101>LBL 03
102 "SCHEDAR"
103 56.3678
104 ENTER^
105 350.3163
106 RTN
107>LBL 04
108 "DIPHDA"
109 -18.1564
110 ENTER^
111 349.4917
112 RTN
113>LBL 05
114 "ACHERNAR"
115 -57.3939
116 ENTER^
117 335.8596
118 RTN
119>LBL 06
120 "HAMAL"
121 23.3167
122 ENTER^
123 328.645
124 RTN
125>LBL 07
126 "ACAMAR"
127 -40.4281
128 ENTER^
129 315.7288
130 RTN
131>LBL 08
132 "MENKAR"
133 3.9692
134 ENTER^
135 314.8358
136 RTN
137>LBL 09
138 "MIRFAK"
139 49.7522
140 ENTER^
141 309.475
142 RTN
143>LBL 10
144 "ALDEBARAN"
145 16.4483
146 ENTER^
147 291.465
148 RTN
149>LBL 11
150 "RIGEL"
151 -8.2361
152 ENTER^
153 281.7383
154 RTN
155>LBL 12
156 "CAPELLA"
157 45.9683
158 ENTER^
159 281.4008
160 RTN
161>LBL 13
162 "BELLATRIX"
163 6.3231
164 ENTER^
165 279.1333
166 RTN
167>LBL 14
168 "ELNATH"
169 28.5828
170 ENTER^
171 278.9175
172 RTN
173>LBL 15
174 "ALNILAM"
175 -1.2203
176 ENTER^
177 276.34
178 RTN
179>LBL 16
180 "BETELGEUSE"
181 7.4028
182 ENTER^
183 271.6267
184 RTN
185>LBL 17
186 "CANOPUS"
187 -52.6783
188 ENTER^
189 264.1854
190 RTN
191>LBL 18
192 "SIRIUS"
193 -16.6722
194 RCL 35
195 .69
196 -
197 .0361
198 X<>Y
199 *
200 LASTX
201 RDN
202 -
203 259.0542
204 R^
205 .0158
206 *
207 +
208 RTN
209>LBL 19
210 "ADHARA"
211 -28.9289
212 ENTER^
213 255.6483
214 RTN
215>LBL 20
216 "PROCYON"
217 5.3056
218 RCL 35
219 .69
220 -
221 .0286
222 X<>Y
223 *
224 LASTX
225 RDN
226 -
227 245.58
228 R^
229 .0186
230 *
231 +
232 RTN
233>LBL 21
234 "POLLUX"
235 28.1025
236 RCL 35
237 .69
238 -
239 .0186
240 *
241 244.1446
242 +
243 RTN
244>LBL 22
245 "AVIOR"
246 -59.4094
247 ENTER^
248 234.53
249 RTN
250>LBL 23
251 "SUHAIL"
252 -43.3069
253 ENTER^
254 223.2863
255 RTN
256>LBL 24
257 "MIAPLACIDUS"
258 -69.5894
259 ENTER^
260 221.7829
261 RTN
262>LBL 25
263 "ALPHARD"
264 -8.5233
265 ENTER^
266 218.4842
267 RTN
268>LBL 26
269 "REGULUS"
270 12.1194
271 ENTER^
272 208.3192
273 RTN
274>LBL 27
275 "DUBHE"
276 61.9186
277 ENTER^
278 194.5429
279 RTN
280>LBL 28
281 "DENEBOLA"
282 14.7453
283 RCL 35
284 .69
285 -
286 .0158
287 *
288 183.13
289 +
290 RTN
291>LBL 29
292 "GIENAH"
293 -17.37
294 ENTER^
295 176.4479
296 RTN
297>LBL 30
298 "ACRUX"
299 -62.9275
300 ENTER^
301 173.785
302 RTN
303>LBL 31
304 "GACRUX"
305 -56.94
306 ENTER^
307 172.6413
308 RTN
309>LBL 32
310 "ALIOTH"
311 56.1278
312 ENTER^
313 166.8325
314 RTN
315>LBL 33
316 "SPICA"
317 -11
318 ENTER^
319 159.1108
320 RTN
321>LBL 34
322 "ALKAID"
323 49.4675
324 ENTER^
325 153.42
326 RTN
327>LBL 35
328 "HADAR"
329 -60.2244
330 ENTER^
331 149.595
332 RTN
333>LBL 36
334 "MENKENT"
335 -36.2183
336 RCL 35
337 .69
338 -
339 .0114
340 X<>Y
341 *
342 LASTX
343 RDN
344 -
345 148.7875
346 R^
347 .0172
348 *
349 +
350 RTN
351>LBL 37
352 "ARCTURUS"
353 19.3431
354 RCL 35
355 .69
356 -
357 .0558
358 X<>Y
359 *
360 LASTX
361 RDN
362 -
363 146.4383
364 R^
365 .0372
366 *
367 +
368 RTN
369>LBL 38
370 "RIGIL KENT."
371 -60.7086
372 RCL 35
373 .69
374 -
375 .0214
376 X<>Y
377 *
378 LASTX
379 RDN
380 +
381 140.63
382 R^
383 .2028
384 *
385 +
386 RTN
387>LBL 39
388 "ZUBEN,UBI"
389 -15.9142
390 ENTER^
391 137.71
392 RTN
393>LBL 40
394 "KOCHAB"
395 74.2822
396 ENTER^
397 137.3058
398 RTN
399>LBL 41
400 "ALPHECCA"
401 26.8181
402 ENTER^
403 126.6567
404 RTN
405>LBL 42
406 "ANTARES"
407 -26.3647
408 ENTER^
409 113.1242
410 RTN
411>LBL 43
412 "ATRIA"
413 -68.9733
414 ENTER^
415 108.6588
416 RTN
417>LBL 44
418 "SABIK"
419 -15.6881
420 ENTER^
421 102.8508
422 RTN
423>LBL 45
424 "SHAULA"
425 -37.0831
426 ENTER^
427 97.1246
428 RTN
429>LBL 46
430 "RASALHAGUE"
431 12.5811
432 ENTER^
433 96.6267
434 RTN
435>LBL 47
436 "ELTANIN"
437 51.4919
438 ENTER^
439 91.0287
440 RTN
441>LBL 48
442 "KAUS AUSTRALIS"
443 -34.4011
444 ENTER^
445 84.4717
446 RTN
447>LBL 49
448 "VEGA"
449 38.7539
450 ENTER^
451 81.0279
452 RTN
453>LBL 50
454 "NUNKI"
455 -26.3369
456 ENTER^
457 76.6642
458 RTN
459>LBL 51
460 "ALTAIR"
461 8.7853
462 RCL 35
463 .69
464 -
465 .01
466 X<>Y
467 *
468 LASTX
469 RDN
470 +
471 62.6825
472 R^
473 .0158
474 *
475 -
476 RTN
477>LBL 52
478 "PEACOCK"
479 -56.8361
480 ENTER^
481 54.1988
482 RTN
483>LBL 53
484 "DENEB"
485 45.1689
486 ENTER^
487 49.9067
488 RTN
489>LBL 54
490 "ENIF"
491 9.7322
492 ENTER^
493 34.3346
494 RTN
495>LBL 55
496 "AL NA,IR"
497 -47.1119
498 ENTER^
499 28.4283
500 RTN
501>LBL 56
502 "FOMALHAUT"
503 -29.7869
504 ENTER^
505 16.015
506 RTN
507>LBL 57
508 "MARKAB"
509 15.0381
510 ENTER^
511 14.1967
512 END

01>LBL "SUN"
02 XEQ "D+T"
03>LBL "*SUN"
04 0
05 GTO 00
06>LBL "*SUNL"
07 1
08 GTO 00
09>LBL "*SUNU"
10 -1
11>LBL 00
12 FC?C 07
13 STO 53
14 "SUN"
15 RCL 30
16 XEQ "FA"
17 RCL 17
18 SIN
19 1.919
20 *
21 RCL 17
22 2
23 *
24 SIN
25 .02
26 *
27 +
28 RCL 17
29 SIN
30 RCL 35
31 *
32 4.72 E-3
33 *
34 -
35 RCL 17
36 RCL 23
37 -
38 COS
39 1.94 E-3
40 *
41 -
42 RCL 16
43 360
44 MOD
45 +
46 RCL 31
47 -
48 STO 38
49 0
50 STO 39
51 1.00014
52 RCL 17
53 COS
54 .01675
55 *
56 -
57 RCL 17
58 2
59 *
60 COS
61 1.4 E-4
62 *
63 -
64 STO 40
65 RCL 38
66 RCL 39
67 4.66 E-3
68 RCL 40
69 /
70 ATAN
71 RCL 53
72 *
73 STO 32
74 CLX
75 RCL 40
76 XEQ "LBRYZX"
77 STO 38
78 RDN
79 STO 40
80 RDN
81 STO 39
82 R^
83 X<>Y
84 R^
85 XEQ "ZYXdHA"
86 STO 45
87 X<>Y
88 STO 46
89 END

01>LBL "MOON"
02 XEQ "D+T"
03>LBL "*MOON"
04 0
05 GTO 00
06>LBL "*MOONU"
07 -1
08 GTO 00
09>LBL "*MOONL"
10 1
11>LBL 00
12 STO 53
13 SF 07
14 XEQ "*SUN"
15 SF 07
16 "MOON"
17 RCL 13
18 SIN
19 6.289
20 *
21 RCL 13
22 RCL 15
23 2
24 *
25 -
26 SIN
27 1.2739
28 *
29 -
30 RCL 15
31 2
32 *
33 SIN
34 .65833
35 *
36 +
37 RCL 13
38 2
39 *
40 SIN
41 .21361
42 *
43 +
44 RCL 17
45 SIN
46 .1856
47 *
48 -
49 RCL 14
50 2
51 *
52 SIN
53 .1144
54 *
55 -
56 RCL 13
57 RCL 15
58 -
59 2
60 *
61 SIN
62 .05889
63 *
64 -
65 RCL 13
66 RCL 15
67 2
68 *
69 -
70 RCL 17
71 +
72 SIN
73 .05722
74 *
75 -
76 RCL 13
77 RCL 15
78 2
79 *
80 +
81 SIN
82 .05333
83 *
84 +
85 RCL 15
86 2
87 *
88 RCL 17
89 -
90 SIN
91 .04583
92 *
93 +
94 RCL 13
95 RCL 17
96 -
97 SIN
98 .04111
99 *
100 +
101 RCL 15
102 SIN
103 .03472
104 *
105 -
106 RCL 13
107 RCL 17
108 +
109 SIN
110 .03056
111 *
112 -
113 RCL 14
114 RCL 15
115 -
116 2
117 *
118 SIN
119 .015278
120 *
121 -
122 RCL 13
123 RCL 14
124 2
125 *
126 +
127 SIN
128 .0125
129 *
130 -
131 RCL 13
132 RCL 14
133 2
134 *
135 -
136 SIN
137 90
138 /
139 +
140 RCL 13
141 RCL 15
142 4
143 *
144 -
145 SIN
146 .01056
147 *
148 -
149 RCL 13
150 3
151 *
152 SIN
153 100
154 /
155 +
156 RCL 13
157 2
158 *
159 RCL 15
160 4
161 *
162 -
163 SIN
164 .00861
165 *
166 -
167 RCL 13
168 RCL 17
169 -
170 RCL 15
171 2
172 *
173 -
174 SIN
175 .007778
176 *
177 +
178 RCL 15
179 2
180 *
181 RCL 17
182 +
183 SIN
184 150
185 /
186 -
187 RCL 13
188 RCL 15
189 -
190 SIN
191 .0052778
192 *
193 +
194 RCL 15
195 RCL 17
196 +
197 SIN
198 200
199 /
200 +
201 RCL 12
202 360
203 MOD
204 +
205 RCL 31
206 -
207 STO 41
208 RCL 14
209 SIN
210 5.1281
211 *
212 RCL 13
213 RCL 14
214 +
215 SIN
216 .28056
217 *
218 +
219 RCL 13
220 RCL 14
221 -
222 SIN
223 3.6
224 /
225 +
226 RCL 14
227 RCL 15
228 2
229 *
230 -
231 SIN
232 .17333
233 *
234 -
235 RCL 13
236 RCL 14
237 -
238 RCL 15
239 2
240 *
241 -
242 SIN
243 .055278
244 *
245 -
246 RCL 13
247 RCL 14
248 +
249 RCL 15
250 2
251 *
252 -
253 SIN
254 .046389
255 *
256 -
257 RCL 14
258 RCL 15
259 2
260 *
261 +
262 SIN
263 .0325
264 *
265 +
266 RCL 13
267 2
268 *
269 RCL 14
270 +
271 SIN
272 .0172
273 *
274 +
275 RCL 13
276 RCL 14
277 -
278 RCL 15
279 2
280 *
281 +
282 SIN
283 .009167
284 *
285 +
286 RCL 13
287 2
288 *
289 RCL 14
290 -
291 SIN
292 112.5
293 /
294 +
295 RCL 14
296 RCL 15
297 2
298 *
299 -
300 RCL 17
301 +
302 SIN
303 120
304 /
305 -
306 RCL 13
307 RCL 15
308 -
309 2
310 *
311 RCL 14
312 +
313 SIN
314 225
315 /
316 -
317 RCL 13
318 RCL 14
319 +
320 RCL 15
321 2
322 *
323 +
324 SIN
325 240
326 /
327 +
328 STO 42
329 60.3629
330 RCL 13
331 COS
332 3.27746
333 *
334 -
335 RCL 13
336 RCL 15
337 2
338 *
339 -
340 COS
341 .57994
342 *
343 -
344 RCL 15
345 2
346 *
347 COS
348 .46357
349 *
350 -
351 RCL 13
352 2
353 *
354 COS
355 .08904
356 *
357 -
358 ENTER^
359 1/X
360 ATAN
361 X<> 53
362 RCL 53
363 *
364 .2725
365 *
366 STO 32
367 X<>Y
368 23454.8
369 /
370 STO 43
371 RCL 41
372 RCL 42
373 RCL 43
374 XEQ "LBRYZX"
375 STO 41
376 RDN
377 STO 43
378 RDN
379 STO 42
380 RCL 43
381 RCL 42
382 RCL 41
383 XEQ "ZYXdHA"
384 STO 45
385 X<>Y
386 STO 46
387 END

01>LBL "VENUS"
02 XEQ "D+T"
03>LBL "*VENUS"
04 XEQ "*SUN"
05 "VENUS"
06 RCL 18
07 SIN
08 .78166667
09 *
10 RCL 19
11 2
12 *
13 SIN
14 .05027778
15 *
16 -
17 RCL 18
18 SIN
19 RCL 35
20 *
21 180
22 /
23 -
24 RCL 18
25 2
26 *
27 SIN
28 300
29 /
30 +
31 RCL 17
32 RCL 18
33 -
34 2
35 *
36 COS
37 360
38 /
39 -
40 RCL 17
41 RCL 18
42 -
43 3
44 *
45 COS
46 1.944 E-3
47 *
48 +
49 RCL 26
50 360
51 MOD
52 +
53 RCL 31
54 -
55 STO 41
56 RCL 19
57 SIN
58 3.393056
59 *
60 RCL 18
61 SIN
62 RCL 19
63 COS
64 *
65 .0461
66 *
67 +
68 STO 42
69 RCL 18
70 COS
71 STO L
72 CLX
73 -.00493
74 ST* L
75 CLX
76 .72335
77 ST+ L
78 X<> L
79 XEQ "P"
80 .0084
81 ST+ 45
82 RCL 45
83 RCL 46
84 RTN
85>LBL "P"
86 XEQ "LBRYZX"
87 RCL 38
88 +
89 STO 41
90 RDN
91 RCL 40
92 +
93 STO 43
94 RDN
95 RCL 39
96 +
97 STO 42
98 RCL 43
99 RCL 42
100 RCL 41
101 XEQ "ZYXdHA"
102 STO 45
103 X<>Y
104 STO 46
105 END

01>LBL "MARS"
02 XEQ "D+T"
03>LBL "*MARS"
04 XEQ "*SUN"
05 "MARS"
06 RCL 20
07 SIN
08 10.68083333
09 *
10 RCL 20
11 2
12 *
13 SIN
14 .6216666667
15 *
16 +
17 RCL 20
18 3
19 *
20 SIN
21 .050277778
22 *
23 +
24 RCL 21
25 2
26 *
27 SIN
28 .014444444
29 *
30 -
31 RCL 20
32 SIN
33 RCL 35
34 *
35 .010277778
36 *
37 +
38 RCL 20
39 RCL 23
40 2
41 *
42 -
43 COS
44 6.111111 E-3
45 *
46 -
47 RCL 27
48 360
49 MOD
50 +
51 RCL 31
52 -
53 STO 41
54 RCL 21
55 SIN
56 1.834166667
57 *
58 RCL 20
59 RCL 21
60 -
61 SIN
62 .17277778
63 *
64 +
65 RCL 20
66 RCL 21
67 +
68 SIN
69 .17083333
70 *
71 +
72 RCL 20
73 2
74 *
75 RCL 21
76 +
77 SIN
78 56.25
79 /
80 +
81 STO 42
82 CLX
83 RCL 20
84 3
85 *
86 COS
87 -4.7 E-4
88 *
89 RCL 20
90 2
91 *
92 COS
93 -6.6 E-3
94 *
95 +
96 RCL 20
97 COS
98 .1417
99 *
100 -
101 1.53031
102 +
103 RCL 42
104 X<>Y
105 XEQ "P"
106 .0093
107 ST- 45
108 .0021
109 ST- 46
110 RCL 45
111 RCL 46
112 END

01>LBL "GCPLAN"
02 XEQ "*ec"
03 XEQ "*IN"
04 RCL 01
05 "D="
06 ARCL X
07 |-"?"
08 PROMPT
09 STO 01
10 RCL 10
11 STO 15
12 RCL 09
13 STO 14
14 RCL 08
15 STO 13
16 RCL 07
17 STO 12
18>LBL "*GCPLAN"
19 RCL 15
20 STO 10
21 RCL 14
22 STO 09
23 RCL 13
24 STO 08
25 RCL 12
26 STO 07
27 XEQ "*GC"
28 FIX 4
29 RND
30 X<>Y
31 STO 06
32 CLX
33 RCL 01
34 /
35 .4999
36 +
37 FIX 0
38 RND
39 1 E3
40 /
41 1
42 +
43 STO 48
44 RCL 07
45 STO 09
46 RCL 08
47 STO 10
48 GTO 00
49>LBL 48
50 XEQ "*GC"
51 X<>Y
52 STO 06
53 XEQ "*GCPOS"
54 XEQ "*RL"
55 ADV
56 "C="
57 FIX 1
58 ARCL Y
59 AVIEW
60 "D="
61 FIX 2
62 ARCL X
63 |-" NMI"
64 AVIEW
65>LBL 00
66 XEQ "DSPP2"
67 RCL 10
68 STO 08
69 RCL 09
70 STO 07
71 RCL 15
72 STO 10
73 RCL 14
74 STO 09
75 ISG 48
76 GTO 48
77 XEQ "*RL"
78 ADV
79 "C="
80 FIX 1
81 ARCL Y
82 AVIEW
83 "D="
84 FIX 2
85 ARCL X
86 |-" NMI"
87 AVIEW
88>LBL 01
89 XEQ "DSPP2"
90 RCL 13
91 STO 08
92 RCL 12
93 STO 07
94 END

01>LBL "SATURN"
02 XEQ "D+T"
03>LBL "*SATUR"
04 XEQ "*SUN"
05 "SATURN"
06 RCL 25
07 SIN
08 6.40139
09 *
10 RCL 35
11 1.39278
12 *
13 +
14 RCL 23
15 2
16 *
17 RCL 25
18 5
19 *
20 -
21 COS
22 .746944
23 *
24 -
25 .696389
26 +
27 RCL 23
28 2
29 *
30 RCL 25
31 5
32 *
33 -
34 SIN
35 .32694
36 *
37 +
38 RCL 23
39 2
40 *
41 RCL 25
42 4
43 *
44 -
45 COS
46 .22944
47 *
48 -
49 RCL 25
50 2
51 *
52 SIN
53 .222778
54 *
55 +
56 RCL 23
57 RCL 25
58 2
59 *
60 -
61 SIN
62 .118056
63 *
64 +
65 RCL 25
66 COS
67 RCL 35
68 *
69 15.7205
70 /
71 -
72 RCL 23
73 2
74 *
75 RCL 25
76 6
77 *
78 -
79 COS
80 .0425
81 *
82 -
83 RCL 25
84 SIN
85 RCL 35
86 *
87 .039444
88 *
89 -
90 RCL 25
91 COS
92 .031667
93 *
94 -
95 RCL 23
96 2
97 *
98 RCL 25
99 5
100 *
101 -
102 SIN
103 RCL 35
104 *
105 .028056
106 *
107 +
108 RCL 24
109 2
110 *
111 1
112 P-R
113 .01944
114 *
115 X<>Y
116 .01861
117 *
118 -
119 -
120 RCL 23
121 2
122 *
123 RCL 25
124 6
125 *
126 -
127 SIN
128 .018333
129 *
130 +
131 RCL 23
132 2
133 *
134 RCL 25
135 5
136 *
137 -
138 COS
139 RCL 35
140 *
141 60
142 /
143 +
144 RCL 23
145 RCL 25
146 3
147 *
148 -
149 SIN
150 87.80
151 /
152 +
153 RCL 25
154 3
155 *
156 SIN
157 92.308
158 /
159 +
160 RCL 23
161 RCL 25
162 -
163 SIN
164 8.6111 E-3
165 *
166 +
167 RCL 23
168 RCL 25
169 -
170 2
171 *
172 SIN
173 8.6111 E-3
174 *
175 +
176 RCL 23
177 2
178 *
179 RCL 25
180 3
181 *
182 -
183 COS
184 8.056 E-3
185 *
186 -
187 RCL 24
188 +
189 360
190 MOD
191 RCL 31
192 -
193 STO 41
194 RCL 25
195 1
196 P-R
197 -.92944
198 *
199 X<>Y
200 2.30472
201 *
202 +
203 RCL 25
204 2
205 *
206 1
207 P-R
208 .0525
209 *
210 X<>Y
211 .128333
212 *
213 -
214 -
215 .051389
216 +
217 RCL 25
218 COS
219 RCL 35
220 *
221 .021944
222 *
223 +
224 RCL 23
225 2
226 *
227 RCL 25
228 4
229 *
230 -
231 COS
232 50.704
233 /
234 -
235 RCL 23
236 2
237 *
238 RCL 25
239 6
240 *
241 -
242 SIN
243 .012778
244 *
245 +
246 RCL 23
247 2
248 *
249 RCL 25
250 6
251 *
252 -
253 COS
254 80
255 /
256 -
257 RCL 25
258 3
259 *
260 SIN
261 .008056
262 *
263 +
264 STO 42
265 9.55774
266 RCL 25
267 COS
268 .53252
269 *
270 -
271 RCL 23
272 2
273 *
274 RCL 25
275 4
276 *
277 -
278 SIN
279 .01878
280 *
281 -
282 RCL 25
283 2
284 *
285 COS
286 .01482
287 *
288 -
289 RCL 23
290 RCL 25
291 -
292 SIN
293 .00817
294 *
295 +
296 STO 43
297 RCL 41
298 RCL 42
299 RCL 43
300 XEQ "P"
301 .0055
302 ST- 45
303 .0064
304 ST- 46
305 RCL 45
306 RCL 46
307 END

01>LBL "JUPITER"
02 XEQ "D+T"
03>LBL "*JUPIT"
04 XEQ "*SUN"
05 "JUPITER"
06 RCL 23
07 SIN
08 5.537222
09 *
10 RCL 35
11 1.3952778
12 *
13 +
14 .6975
15 +
16 RCL 23
17 2
18 *
19 RCL 25
20 5
21 *
22 -
23 COS
24 .303611
25 *
26 +
27 RCL 23
28 2
29 *
30 SIN
31 5.99
32 /
33 +
34 RCL 23
35 2
36 *
37 RCL 25
38 5
39 *
40 -
41 SIN
42 .133056
43 *
44 -
45 RCL 23
46 RCL 25
47 -
48 2
49 *
50 SIN
51 .051389
52 *
53 -
54 RCL 23
55 3
56 *
57 RCL 25
58 5
59 *
60 -
61 SIN
62 .038056
63 *
64 +
65 RCL 23
66 RCL 25
67 2
68 *
69 -
70 SIN
71 .036389
72 *
73 -
74 RCL 23
75 RCL 25
76 -
77 COS
78 .02194
79 *
80 +
81 RCL 23
82 RCL 25
83 -
84 2
85 *
86 COS
87 .02111
88 *
89 -
90 RCL 23
91 COS
92 RCL 35
93 *
94 .020556
95 *
96 -
97 RCL 23
98 SIN
99 RCL 35
100 *
101 52.94
102 /
103 +
104 RCL 23
105 2
106 *
107 RCL 25
108 3
109 *
110 -
111 COS
112 54.55
113 /
114 +
115 RCL 23
116 3
117 *
118 RCL 25
119 5
120 *
121 -
122 COS
123 .0175
124 *
125 +
126 RCL 22
127 +
128 360
129 MOD
130 RCL 31
131 -
132 STO 41
133 RCL 23
134 COS
135 -1.3033
136 *
137 RCL 23
138 SIN
139 13.9
140 /
141 +
142 1
143 RCL 23
144 2
145 *
146 COS
147 -
148 .063056
149 *
150 +
151 STO 42
152 RCL 23
153 2
154 *
155 COS
156 -.00604
157 *
158 RCL 23
159 COS
160 .25122
161 *
162 -
163 5.20883
164 +
165 STO 43
166 RCL 41
167 RCL 42
168 RCL 43
169 XEQ "P"
170 .0229
171 ST- 45
172 .0022
173 ST- 46
174 RCL 45
175 RCL 46
176 END

01>LBL "SRT"
02 SF 21
03 "T=?"
04 PROMPT
05 "L=?"
06 PROMPT
07 "D=?"
08 PROMPT
09 XEQ "*SRT"
10 "Hc="
11 ARCL X
12 AVIEW
13 "ZN="
14 ARCL Y
15 AVIEW
16 RTN
17>LBL "*SRT"
18 1
19 P-R
20 R^
21 X<>Y
22 P-R
23 R^
24 STO 00
25 X<>Y
26 P-R
27 X<> 00
28 R^
29 P-R
30 X<> 00
31 +
32 X<> 00
33 -
34 R-P
35 RDN
36 180
37 +
38 RCL 00
39 ASIN
40 END

01>LBL "JD"
02 STO 30
03 RCL 30
04 INT
05 STO 31
06 LASTX
07 FRC
08 1 E2
09 *
10 INT
11 STO 32
12 LASTX
13 FRC
14 1 E4
15 *
16 STO 29
17 367
18 *
19 RCL 31
20 9
21 +
22 12
23 /
24 INT
25 RCL 29
26 +
27 7
28 *
29 4
30 /
31 INT
32 -
33 RCL 31
34 9
35 -
36 7
37 /
38 INT
39 RCL 29
40 +
41 1 E2
42 /
43 INT
44 1
45 +
46 3
47 *
48 4
49 /
50 INT
51 -
52 RCL 31
53 275
54 *
55 9
56 /
57 INT
58 +
59 RCL 32
60 +
61 730516.5
62 -
63 RCL 34
64 24
65 /
66 +
67 STO 36
68 36525
69 /
70 1
71 +
72 STO 35
73 2451545
74 RCL 36
75 +
76 END

01>LBL "D+T"
02 SF 21
03 RCL 30
04 "DATE="
05 FIX 6
06 ARCL X
07 |-"?"
08 PROMPT
09 STO 30
10 RCL 34
11 CLA
12 XEQ "*T"
13 FIX 4
14 |-"?"
15 RCL 34
16 HMS
17 PROMPT
18 HR
19 STO 34
20 END

01>LBL "LBRYZX"
02 RCL 29
03 RDN
04 P-R
05 X<>Y
06 RDN
07 P-R
08 STO 00
09 RDN
10 P-R
11 X<> Z
12 RCL 29
13 X<>Y
14 P-R
15 ST+ Z
16 RDN
17 ST- Z
18 X<> 00
19 END

01>LBL "ZYXdHA"
02 R-P
03 X<>Y
04 X<> Z
05 R-P
06 LASTX
07 X<>Y
08 /
09 ASIN
10 360
11 R^
12 -
13 END

01>LBL "DSPHAd"
02 |-" GHA="
03 RCL 44
04 RCL 45
05 +
06 360
07 MOD
08 XEQ "*DMS"
09 AVIEW
10 "DEC="
11 RCL 46
12 XEQ "*DMS"
13 FS? 05
14 |-"S"
15 FC? 05
16 |-"N"
17 AVIEW
18 END

01>LBL "*IN1"
02 SF 21
03 RCL 07
04 "L1"
05 XEQ "DSPL"
06 |-"?"
07 PROMPT
08 XEQ "*HR"
09 STO 07
10 RCL 08
11 "LO1"
12 XEQ "DSPLO"
13 |-"?"
14 PROMPT
15 XEQ "*HR"
16 STO 08
17 RCL 09
18 RTN
19>LBL "*IN"
20 XEQ "*IN1"
21 "L2"
22 XEQ "DSPL"
23 |-"?"
24 PROMPT
25 XEQ "*HR"
26 STO 09
27 RCL 10
28 "LO2"
29 XEQ "DSPLO"
30 |-"?"
31 PROMPT
32 XEQ "*HR"
33 STO 10
34 RTN
35>LBL "*DMT"
36 STO 00
37 CF 05
38 SIGN
39 0
40 X>Y?
41 SF 05
42 LASTX
43 ABS
44 INT
45 FIX 0
46 CF 29
47 ARCL X
48 |-":"
49 10
50 LASTX
51 FRC
52 60
53 *
54 FIX 1
55 X<Y?
56 |-"0"
57 ARCL X
58 FIX 4
59 RCL 00
60 SF 29
61 HMS
62 100
63 *
64 FRC
65 LASTX
66 INT
67 X<>Y
68 .6
69 /
70 +
71 100
72 /
73 RTN
74>LBL "*DMS"
75 FS? 00
76 GTO "*DMT"
77 HMS
78 STO 00
79 FIX 4
80 RND
81 HR
82 HMS
83 CF 05
84 SIGN
85 0
86 X>Y?
87 SF 05
88 LASTX
89 ABS
90 INT
91 FIX 0
92 CF 29
93 ARCL X
94 |-":"
95 10
96 LASTX
97 FRC
98 100
99 *
100 INT
101 X<Y?
102 |-"0"
103 ARCL X
104 |-":"
105 10
106 LASTX
107 FRC
108 100
109 *
110 INT
111 X<Y?
112 |-"0"
113 ARCL X
114 RCL 00
115 FIX 4
116 SF 29
117 RTN
118>LBL "*HR"
119 FC? 00
120 GTO 00
121 1 E2
122 *
123 FRC
124 LASTX
125 INT
126 X<>Y
127 .6
128 *
129 +
130 1 E2
131 /
132>LBL 00
133 HR
134 END

01>LBL "*T"
02 CF 29
03 HMS
04 FIX 4
05 RND
06 HR
07 HMS
08 FIX 0
09 INT
10 |-"TIME="
11 ARCL X
12 |-":"
13 LASTX
14 FRC
15 1 E2
16 *
17 10
18 X>Y?
19 |-"0"
20 RDN
21 INT
22 ARCL X
23 |-":"
24 LASTX
25 FRC
26 1 E2
27 *
28 10
29 X>Y?
30 |-"0"
31 RDN
32 RND
33 ARCL X
34 SF 29
35 END

01>LBL "FA"
02 FS?C 06
03 RTN
04 XEQ "JD"
05 RCL 36
06 13.17639643
07 *
08 218.31624
09 +
10 STO 12
11 134.96292
12 RCL 36
13 13.06499295
14 *
15 +
16 STO 13
17 93.27276
18 RCL 36
19 13.22935027
20 *
21 +
22 STO 14
23 RCL 12
24 -
25 STO 28
26 280.46592
27 RCL 36
28 .985647348
29 *
30 +
31 STO 16
32 RCL 12
33 -
34 CHS
35 STO 15
36 -2.47464
37 RCL 36
38 .9856
39 *
40 +
41 STO 17
42 50.40828
43 RCL 36
44 1.60213022
45 *
46 +
47 STO 18
48 105.29928
49 RCL 36
50 1.60214407
51 *
52 +
53 STO 19
54 19.38816
55 RCL 36
56 .52402078
57 *
58 +
59 STO 20
60 305.88984
61 RCL 36
62 .524050085
63 *
64 +
65 STO 21
66 32.25888
67 RCL 36
68 .083091215
69 *
70 +
71 STO 22
72 20.35116
73 RCL 36
74 .08309121
75 *
76 +
77 STO 23
78 47.9862
79 RCL 36
80 .033459736
81 *
82 +
83 STO 24
84 317.87532
85 RCL 36
86 .033459736
87 *
88 +
89 STO 25
90 181.97928
91 RCL 36
92 1.602169
93 *
94 +
95 STO 26
96 -4.55292
97 RCL 36
98 .524071181
99 *
100 +
101 STO 27
102 RCL 12
103 RCL 14
104 -
105 STO 28
106 COS
107 400
108 /
109 RCL 35
110 1.3056 E-2
111 *
112 -
113 23.4522222
114 +
115 STO 29
116 RCL 28
117 SIN
118 4.7222 E-3
119 *
120 STO 31
121 XEQ "GST"
122 STO 44
123 RTN
124>LBL "GST"
125 RCL 35
126 RCL 34
127 24
128 /
129 36525
130 /
131 -
132 ENTER^
133 ENTER^
134 ENTER^
135 .000387083
136 *
137 36000.76893
138 +
139 *
140 360
141 MOD
142 99.69098325
143 +
144 RCL 34
145 15.04106863
146 *
147 +
148 360
149 MOD
150 END

01>LBL "BODY"
02 XEQ "D+T"
03 XEQ "*BODY"
04 XEQ "DSPHAd"
05 RTN
06>LBL "*BODY"
07 CF 06
08 "WHICH BODY?"
09 CF 22
10 CF 23
11 AON
12 PROMPT
13 AOFF
14 FS? 22
15 STO 47
16 FS?C 22
17 GTO 01
18 ASTO 48
19 "*"
20 ARCL 48
21 ASTO X
22 RCL 30
23 SF 25
24 XEQ IND Y
25 FS? 25
26 RTN
27 XEQ "FA"
28 0.057
29 STO 47
30>LBL 47
31 SF 06
32 XEQ "*STAR"
33 ASTO X
34 RCL 48
35 X=Y?
36 GTO 02
37 ISG 47
38 GTO 47
39 XEQ "*NA"
40 RTN
41>LBL 01
42 RCL 30
43 XEQ "FA"
44>LBL 02
45 XEQ "*STAR"
46 END

01>LBL "SIGHT"
02 RCL 07
03 "DRL"
04 XEQ "DSPL"
05 |-"?"
06 PROMPT
07 XEQ "*HR"
08 STO 07
09 RCL 08
10 "DRLO"
11 XEQ "DSPLO"
12 |-"?"
13 PROMPT
14 XEQ "*HR"
15 STO 08
16 XEQ "D+T"
17 "HE="
18 FIX 0
19 RCL 49
20 CF 05
21 X<0?
22 SF 05
23 ABS
24 FS? 05
25 GTO 00
26 ARCL X
27 |-" FT?"
28 GTO 01
29>LBL 00
30 ARCL X
31 |-" M?"
32>LBL 01
33 FS? 05
34 CHS
35 PROMPT
36 STO 49
37 "HS=?"
38 PROMPT
39 XEQ "*HR"
40 ENTER^
41 XEQ "RM"
42 RCL 49
43 X<0?
44 -.3048
45 X<0?
46 /
47 SQRT
48 .97
49 *
50 -
51 60
52 /
53 +
54 STO 51
55 0
56 STO 53
57 XEQ "*BODY"
58 RCL 44
59 RCL 45
60 +
61 RCL 08
62 -
63 RCL 07
64 RCL 46
65 XEQ "*SRT"
66 FS?C 07
67 XEQ 02
68 RCL 32
69 -
70 RCL 51
71 -
72 60
73 *
74 X<0?
75 GTO 00
76 |-" a="
77 FIX 1
78 ARCL X
79 |-" A"
80 GTO 01
81>LBL 00
82 CHS
83 |-" a="
84 FIX 1
85 ARCL X
86 |-" T"
87>LBL 01
88 AVIEW
89 "ZN="
90 ARCL Y
91 P-R
92 R-P
93 STO 01
94 X<>Y
95 360
96 MOD
97 STO 06
98 AVIEW
99 RTN
100>LBL 02
101 RCL 53
102 TAN
103 1/X
104 RCL Y
105 SIN
106 -
107 RCL 53
108 *
109 RCL 32
110 X<>Y
111 /
112 ATAN
113 STO 32
114 RDN
115 RCL X
116 COS
117 RCL 53
118 *
119 -
120 END

01>LBL "RM"
02 ENTER^
03 3
04 X<>Y
05 +
06 LASTX
07 X<>Y
08 12
09 *
10 ATAN
11 -
12 TAN
13 .97
14 *
15 END

01>LBL "DR"
02 XEQ "*ec"
03 XEQ "*IN1"
04 "D="
05 RCL 01
06 ARCL 01
07 |-"?"
08 PROMPT
09 STO 01
10 "C="
11 RCL 06
12 ARCL 06
13 |-"?"
14 PROMPT
15 STO 06
16>LBL 00
17 XEQ "*DR"
18 RCL 09
19 "DRL"
20 XEQ "DSPL"
21 AVIEW
22 RCL 10
23 "DRLO"
24 XEQ "DSPLO"
25 AVIEW
26 RTN
27 GTO 00
28>LBL "*DR"
29 XEQ "*RLPOS"
30 RCL 10
31 STO 08
32 RCL 09
33 STO 07
34 END

01>LBL "GCPOS"
02 XEQ "*IN1"
03 RCL 01
04 FIX 1
05 "D="
06 ARCL X
07 |-"NMI?"
08 PROMPT
09 STO 01
10 RCL 06
11 "HI="
12 ARCL X
13 |-"?"
14 PROMPT
15 STO 06
16 XEQ "*GCPOS"
17 RCL 09
18 "L2"
19 XEQ "DSPL"
20 AVIEW
21 RCL 10
22 "LO2"
23 XEQ "DSPLO"
24 AVIEW
25 RTN
26>LBL "*GCPOS"
27 RCL 06
28 90
29 RCL 01
30 60
31 /
32 -
33 RCL 07
34 X<>Y
35 XEQ "*SRT"
36 STO 09
37 X<>Y
38 RCL 08
39 +
40 1
41 P-R
42 R-P
43 X<>Y
44 FIX 5
45 RND
46 STO 10
47 END

01>LBL "GC"
02 XEQ "*IN"
03 XEQ "*GC"
04 FIX 1
05 "D="
06 ARCL X
07 |-" NMI"
08 AVIEW
09 FIX 1
10 "HI="
11 ARCL Y
12 AVIEW
13 RTN
14>LBL "*GC"
15 RCL 10
16 RCL 08
17 -
18 RCL 07
19 RCL 09
20 XEQ "*SRT"
21 90
22 -
23 CHS
24 60
25 *
26 X<>Y
27 360
28 MOD
29 X<>Y
30 FIX 5
31 RND
32 END

01>LBL "GCPLOT"
02 XEQ "*ec"
03 XEQ "*IN"
04 RCL 05
05 ABS
06 "DLO="
07 XEQ "*DMS"
08 |-"?"
09 PROMPT
10 ABS
11 XEQ "*HR"
12 STO 05
13 RCL 10
14 STO 15
15 RCL 09
16 STO 14
17 RCL 08
18 STO 13
19 RCL 07
20 STO 12
21>LBL "*GCPLOT"
22 CF 09
23 RCL 12
24 STO 07
25 STO 09
26 RCL 13
27 STO 08
28 STO 10
29 RCL 13
30 RCL 05
31 /
32 RCL 15
33 RCL 13
34 -
35 SIN
36 ASIN
37 RCL 05
38 /
39 SIGN
40 ST* 05
41 1.001
42 STO 48
43 RCL 13
44 CHS
45 RCL 05
46 MOD
47 X=0?
48 SF 09
49 RCL 13
50 +
51 STO 52
52 RCL 15
53 -
54 RCL 05
55 SIGN
56 *
57 CHS
58 X<0?
59 GTO 00
60 FC? 09
61 XEQ 03
62 RCL 52
63 STO 10
64 RCL 15
65 RCL 10
66 -
67 SIN
68 ASIN
69 SIGN
70 LASTX
71 X<>Y
72 RCL 05
73 *
74 /
75 INT
76 1 E3
77 /
78 ABS
79 ST+ 48
80 FS?C 09
81 GTO 00
82>LBL 48
83 XEQ "*LOTOL"
84 STO 09
85 XEQ "*RL"
86 ADV
87 "C="
88 FIX 1
89 ARCL Y
90 AVIEW
91 "D="
92 FIX 2
93 ARCL X
94 |-" NMI"
95 AVIEW
96>LBL 00
97 XEQ "DSPP2"
98 RCL 10
99 STO 08
100 RCL 09
101 STO 07
102 RCL 10
103 RCL 05
104 +
105 1
106 P-R
107 R-P
108 RDN
109 STO 10
110 ISG 48
111 GTO 48
112 RCL 09
113 STO 07
114 RCL 10
115 RCL 05
116 -
117 1
118 P-R
119 R-P
120 RDN
121 STO 08
122 RCL 14
123 STO 09
124 RCL 15
125 STO 10
126 XEQ "*RL"
127 FIX 1
128 RND
129 0
130 X=Y?
131 GTO 02
132 CLX
133 21600
134 X=Y?
135 GTO 02
136 ADV
137 RDN
138 "C="
139 FIX 1
140 ARCL Y
141 AVIEW
142 "D="
143 FIX 2
144 ARCL X
145 |-" NMI"
146 AVIEW
147>LBL 01
148 XEQ "DSPP2"
149>LBL 02
150 RCL 13
151 STO 08
152 RCL 12
153 STO 07
154 RTN
155>LBL "DSPP2"
156 ADV
157 RCL 48
158 INT
159 FIX 0
160 "L"
161 CF 29
162 ARCL X
163 SF 29
164 RCL 09
165 XEQ "DSPL"
166 AVIEW
167 RCL 48
168 INT
169 "LO"
170 FIX 0
171 CF 29
172 ARCL X
173 SF 29
174 RCL 10
175 XEQ "DSPLO"
176 AVIEW
177 RTN
178>LBL 03
179 XEQ "DSPP2"
180 1.001
181 ST+ 48
182 END

01>LBL "LOTOL"
02 XEQ "*IN"
03 RCL 10
04 STO 15
05 RCL 09
06 STO 14
07 "LOI=?"
08 PROMPT
09 XEQ "*HR"
10 STO 10
11 XEQ "*LOTOL"
12 X<> 14
13 STO 09
14 RCL 15
15 X<> 10
16 STO 15
17 RCL 14
18 "LI"
19 XEQ "DSPL"
20 AVIEW
21 RTN
22>LBL "*LOTOL"
23 RCL 07
24 1
25 P-R
26 RCL 14
27 1
28 P-R
29 X<> Z
30 *
31 LASTX
32 RDN
33 RDN
34 *
35 LASTX
36 ST* Z
37 X<> Z
38 ST/ T
39 /
40 X<>Y
41 CLX
42 RCL 10
43 RCL 08
44 -
45 SIN
46 ST* Z
47 CLX
48 RCL 10
49 RCL 15
50 -
51 SIN
52 *
53 -
54 RCL 15
55 RCL 08
56 -
57 SIN
58 /
59 ATAN
60 END

01>LBL "DSPL"
02 |-"="
03 XEQ "*DMS"
04 FS? 05
05 |-"S"
06 FC? 05
07 |-"N"
08 RTN
09>LBL "DSPLO"
10 |-"="
11 XEQ "*DMS"
12 FS? 05
13 |-"E"
14 FC? 05
15 |-"W"
16 END

01>LBL "RLPOS"
02 XEQ "*ec"
03 XEQ "*IN1"
04 FIX 1
05 RCL 01
06 "D="
07 ARCL X
08 |-"NMI?"
09 PROMPT
10 STO 01
11 RCL 06
12 "C="
13 ARCL X
14 |-"?"
15 PROMPT
16 STO 06
17 XEQ "*RLPOS"
18 RCL 09
19 "L2"
20 XEQ "DSPL"
21 AVIEW
22 RCL 10
23 "LO2"
24 XEQ "DSPLO"
25 AVIEW
26 RTN
27>LBL "*RLPOS"
28 RCL 06
29 COS
30 X=0?
31 GTO 00
32 RCL 01
33 *
34 60
35 /
36 RCL 07
37 +
38 STO 09
39 XEQ "*M/a"
40 STO 00
41 RCL 07
42 XEQ "*M/a"
43 RCL 00
44 /
45 LN
46 RCL 06
47 TAN
48 *
49 180
50 *
51 PI
52 /
53 RCL 08
54 X<>Y
55 -
56 1
57 P-R
58 R-P
59 X<>Y
60 STO 10
61 RTN
62>LBL 00
63 LASTX
64 SIN
65 RCL 01
66 *
67 60
68 /
69 RCL 07
70 STO 09
71 COS
72 /
73 RCL 08
74 -
75 CHS
76 1
77 P-R
78 R-P
79 X<>Y
80 STO 10
81 END

01>LBL "RL"
02 XEQ "*ec"
03 XEQ "*IN"
04 XEQ "*RL"
05 FIX 1
06 "D="
07 ARCL X
08 |-" NMI"
09 AVIEW
10 FIX 1
11 "C="
12 ARCL Y
13 AVIEW
14 RTN
15>LBL "*RL"
16 RCL 09
17 XEQ 10
18 STO 00
19 RCL 07
20 XEQ 10
21 RCL 00
22 /
23 LN
24 RCL 08
25 RCL 10
26 -
27 STO 00
28 2
29 /
30 SIN
31 ASIN
32 90
33 /
34 PI
35 *
36 X<>Y
37 R-P
38 X<>Y
39 ABS
40 RCL 00
41 SIN
42 ASIN
43 X>0?
44 GTO 00
45 CLX
46 360
47 -
48 ABS
49 ENTER^
50>LBL 00
51 X<>Y
52 X<> 00
53 RCL 07
54 COS
55 *
56 ENTER^
57 RCL 09
58 RCL 07
59 -
60 RCL 00
61 COS
62 X!=0?
63 /
64 ENTER^
65 X=0?
66 R^
67 ABS
68 60
69 *
70 RCL 00
71 X<>Y
72 RTN
73>LBL "*M/a"
74>LBL 10
75 SIN
76 LASTX
77 1
78 P-R
79 X<>Y
80 1
81 +
82 /
83 1
84 R^
85 RCL 11
86 *
87 -
88 LASTX
89 1
90 +
91 /
92 RCL 11
93 2
94 /
95 Y^X
96 /
97 END

01>LBL "*ec"
02 SCI 5
03 RCL 11
04 "e="
05 ARCL 11
06 |-"?"
07 PROMPT
08 STO 11
09 END
DM42 SN:00449, DM15L SN #01134
Old HP Gear; HP-11, HP-15 , HP-41CX, HP-48GX and HP-50G, HP-Prime.

Thomas Okken
Posts: 486
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Sun Feb 18, 2018 5:41 pm

grsbanks wrote:
Sun Feb 18, 2018 11:58 am
OK, I've fixed this in my code. It also choked on numbers with an absolute value less than 1 that didn't have the leading '0'. Eg. -0.5 and 0.8 would be fine but with -.5 and .8 it would get its knickers in a twist.
You should also check if it handles . and E by themselves; apparently those are actually used as (faster? geekier?) alternatives to 0 and 1. Free42 2.0.15, when importing raw files, handles . but not E; I'm adding support for E and -E in 2.0.16.

grsbanks
Posts: 703
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: conversion .mod file to RAW

Post by grsbanks » Sun Feb 18, 2018 6:16 pm

I think it'll accept '.' and '-.' on its own but I'll double-check.

I don't think it'll accept E or -E so I'll look at that. If Free42 is going to accept it then the decoder/encoder should.
Not SwissMicros staff, just an enthusiast.

Thomas Okken
Posts: 486
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Sun Feb 18, 2018 7:13 pm

grsbanks wrote:
Sun Feb 18, 2018 6:16 pm
I don't think it'll accept E or -E so I'll look at that. If Free42 is going to accept it then the decoder/encoder should.
Do you know what the plans are for syncing up DM42 with the latest Free42? The reason I'm asking is that I have finished my to-do list, and have no further work planned, apart from the E / -E change. I'm thinking of sitting on 2.0.16 for a couple of weeks, in case more bug reports come in, so that I could then handle those in 2.0.16 as well... but if you're planning on merging the latest Free42, say, next week, I'll release 2.0.16 without further delay.

grsbanks
Posts: 703
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: conversion .mod file to RAW

Post by grsbanks » Sun Feb 18, 2018 8:58 pm

Do feel free to sit on it for now. Nothing is going to happen for a good week while both Michael and David are away and we have yet to get up to 2.0.15 anyway (I've pulled down the tarball for that and will soon see if the SM patch applies to it without complaining).

There's no mad rush to get 2.0.16 out as far as we're concerned. We'll fall in line with what you do.
Not SwissMicros staff, just an enthusiast.

Thomas Okken
Posts: 486
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Mon Feb 19, 2018 12:14 am

Perfect.

Also, I just discovered that Free42 mis-handles certain synthetics, e.g. 91 7F is interpreted as STO e, while it should be STO 127.

Checking all synthetic function/parameter combinations in Emu42 and modifying the raw file parser in Free42 accordingly will take some time. Next weekend at the earliest...

Post Reply