Moon Landing on DM42?

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: https://technical.swissmicros.com/decoders/dm42/

You can then copy/paste the listing and post it in "code" tags.
Post Reply
Vitasam

Moon Landing on DM42?

Post by Vitasam »

Is there Moon Landing on DM42?
keithdalby
Posts: 564
Joined: Mon Apr 24, 2017 8:38 pm

Re: Moon Landing on DM42?

Post by keithdalby »

?
Vitasam

Re: Moon Landing on DM42?

Post by Vitasam »

Sorry, typo. "Moon Lander", a game
rprosperi
Posts: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Moon Landing on DM42?

Post by rprosperi »

Here is a version for the 41C family, which should be easily ported to the 42S, it may even run as-is, I did not examine it closely:

http://www.hpmuseum.org/software/41td/land67.htm
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Moon Landing on DM42?

Post by Thomas Okken »

Over at the MoHPC, there is the Moon Lander from the HP-25 (link), with explanation and instructions. It's pretty easy to port to the HP-42S:

Code: Select all

00 { 90-Byte Prgm }
01▸LBL "ML"
02 500
03 STO 00
04 -50
05 STO 01
06 120
07 STO 02
08▸LBL 00
09 FIX 04
10▸LBL 02
11 RCL 00
12 1ᴇ4
13 ÷
14 RCL 01
15 X<0?
16 GTO 11
17 +
18 GTO 13
19▸LBL 11
20 X<>Y
21 -
22▸LBL 13
23 STOP
24 RCL 02
25 X<Y?
26 GTO 34
27 R↓
28 STO- 02
29 5
30 -
31 STO 03
32 2
33 ÷
34 RCL 00
35 +
36 RCL 01
37 +
38 STO 00
39 X<0?
40 GTO 44
41 RCL 03
42 STO+ 01
43 GTO 02
44▸LBL 34
45 RCL 01
46 X↑2
47 RCL 00
48 10
49 ×
50 +
51 SQRT
52 +/-
53 STO 01
54▸LBL 44
55 RCL 01
56 FIX 00
57 END
It's not as fancy as the HP-67 version, but on the positive side, it doesn't rely on the ability to enter data during PAUSE that the 67 has but the 41C and 42S do not.

In case you want to enter the HP-67 conversion, make sure to enter 7DSP0 as FIX 00 and 7DSP4 as FIX 04 (those are HP-67 compatibility functions provided by the HP-82104A card reader; they set the number of digits of the display mode, without setting/changing FIX/SCI/ENG), and some reasonably obvious other changes: / as ÷, * as ×, 50- as -50, E4 as 1ᴇ4, CHS as +/-, etc.

The HP-25 program converted for the 42S, shown above, can be copied and pasted into Free42, then saved as raw, transferred to the DM42, and loaded, but for such a short program, it may be less of a hassle to just type it by hand, at least if you know your way around the HP-42S/DM42 keyboard.
Vitasam

Re: Moon Landing on DM42?

Post by Vitasam »

Ok, thanks to all!
Post Reply