|Moon landing simulators and display mode|
Message #4 Posted by Andrés C. Rodríguez (Argentina) on 23 Dec 2000, 7:26 a.m.,
in response to message #3 by r. d. bärtschiger.
As I recall, the moon landing simulator for the HP67 was an "improved" version of the simulator for the HP25. The -67 version included the use of the PSE (Pause) function with live keyboard, so to give you four seconds to enter the amount of fuel that you are willing to burn on each program iteration.
On the HP25, the program stopped, waiting for input, and it was up to the user to enter the value and press R/S. On the HP67, the more sophisticated Pause function allowed for a value to be entered without stopping the program; and if the user did not enter a value, the program just keep running with a default value (possibly 0 in this case).
Since the Pause function had a 1 second duration, the 4 second interval was obtained repeating Pause instructions, possible with a looping construct such as DSZ (Decrement and Skip when Zero), which allowed "en passant" for a countdown display (4...3...2...1...) with almost no programming cost. (Oh, such elegant solutions from the golden time where memory was counted byte by byte and not "by the gig")
Since PSE works on this same way on the HP41, the program will work on it; keep in mind that the PSE instruction works differently on a HP42 (no live keyboard)
Another improvement this program received when ported from the HP25 to the 67 was to take into account the mass of fuel already burnt, so the Lunar Module mass decreased on each iteration.
With regard to the display mode, and taking into account that the 7DSP 4 instruction appears at the beginning of the program (which suggests an initialization routine, not part of a main loop), I assume that the display mode is set once when the program starts, and will not change during the "flight". So a FIX 4 instruction will be OK. If the program works the same way than in the HP25, the display will change to FIX 0 if the module crashed on the moon. FIX 0 should be interpreted as a Game Over message. On the next run, the display will revert to FIX 4.
I hope this will help, I was very interested on such simulators at the time, but these comments come from my memory, and there may be some missing detail.