The Museum of HP Calculators

HP Forum Archive 09

[ Return to Index | Top of Index ]

42s Programming Question
Message #1 Posted by Steven Soto on 19 Sept 2002, 8:45 p.m.

For convenience, I would like to "insert" a program so that the menu keys for the programs are in a particular order. If I use the GOTO . . I get a new program at the "front" of the menu, which corresponds to the last program in memory. Can I do this without re-entering programs?

Is it possible to do this, or should I use the custom menu and assign programs to keys that way?

      
Re: 42s Programming Question
Message #2 Posted by Vieira, Luiz C. (Brazil) on 19 Sept 2002, 11:32 p.m.,
in response to message #1 by Steven Soto

Hi;

I am almost sure the procedures described bellow are known by you, but I decided to keep them there, so anyone else that doesn't know how to accomplish these procedures will be able to understand; O.K.?

There is no other way to put program labels in a specific order than by "inserting" them in memory in this order. As you mentioned, after a GTO[.][.], the "program memory" (an internal pointer) will be positioned in the "top" of the program memory.

Anyway, you can always position the pointer in between two existing programs and "insert" a complete, new one in there. Imagine you have:

.END.
END
.
.
LBL"THELAST"
END
.
.
LBL"THENEXT"
END
.
.
LBL"FIRSTNE"
If you want to add a new one and get this arrangement:
.END.
END
.
.
LBL"LAST"
END
.
.
LBL"NEXT"
END
.
.
LBL"MID"
END
.
.
LBL"FIRST"
you should: (in normal mode)
[SHIFT][GTO] [NEXT]     (NEXT will appear as a menu key)
[SHIFT][PRGM]           (enters into PRGM mode)
[SHIFT][GTO][.]0[ENTER] (positions before the first line of NEXT program)
                        (insert all lines for the program
[XEQ] END               (so the new program in its own space...)
[SHIFT][PRGM]           (leaves PRGM mode)
[SHIFT][GTO][.][.] 

Otherwise, if you want to trade one label for the other, you should "reinsert" all lines for the existing program and delete it's previous "existence".

Using CUSTOM or TMENU (with KEYGO or KEYXEQ) will be, indeed, more efficient, as you mentioned.

As I mentioned in the beginning, I am almost sure you are reading about your own thoughts. Anyway, I hope this helps.

Cheers.

(Please, if there is anything wrong, allow me to know)

            
Re: 42s Programming Question
Message #3 Posted by Steven Soto on 22 Sept 2002, 6:17 p.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

Luiz,

Thanks. I was just airing out a brain fart. I was trying to insert a "LBL" function when I should have been inserting an "END" function.

I should have known better. I've been using the same calculator since 1990. It got me through high school, undergrad and grad school (mechanical engineering). One would think I could do something like this without asking.

Thanks again.

Steven

                  
May I?
Message #4 Posted by Vieira, Luiz C. (Brazil) on 22 Sept 2002, 10:16 p.m.,
in response to message #3 by Steven Soto

Hi!

You see? I was sure you knew it. it was a matter of reading and figurin out your own answer.

I'm a teacher, and I encourage my students to ask WHATEVER they want to. Among many, the best benefits for me are:

I'll know if I'm able to figure out an answer; I'll know if my answer clears the doubt out; I'll show myself I have these abilities

Wanna know something? I believe I speak for the others when I say this: everytime I know the answer to some of the questions posted here, I'm posting it ASAP, so I'll have the chance to hear from the others that will, when needed, correct my answer OR complet it. It's a sharing place! When I myself fail knowing the answer, I ansiously wait till someone posts it.

Thank you allowing me to know I know this answer. (in fact, from previous HP41 knowledge base..)

Best regards.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall