|Re: 16c vs 12c program problem|
Message #10 Posted by Vieira, Luiz C. (Brazil) on 20 June 2004, 3:34 p.m.,
in response to message #3 by John Nelson
I agree with Don about both: the no need for adding the LBL and GTO (or RTN), that would actualy "separate" your program from others in memory, and I also agree with him about the possibility of existing programs in memory so your
is, in fact, running correctly and right after obtainning the answer, it goes for another program that may be the one that is running in loop.
About the HP12C program structure. As you seem to be a 12C user, you know that everytime you type in an additional function at the end of a program that claims an extra, nonavailable byte, all remaining six bytes of the "converted" register are filled with
43,33 00or [g][GTO]00. This does not happen in the HP16C: even if extra bytes are claimed to compose program steps, they are only used when additional functions actualy claim these bytes. In other words, you don't "see" them unless you "use" them. Based on the HP16C structure, you'll never have such [GTO]program_step because the 16C knows only [GTO]label, while the HP12C (and the HP10C as well) only knows [GTO]program_step.
In your example, the sequence
uses 5 bytes and if it is the only program in memory, three
43,33 00 will still be available, and when any of them is executed in a running program, the calculator will be positioned in step 00- and the program stops. that's probably the reason that the program runs correctly in the HP12C.
The other additional feature in the HP16C is that new functions (program steps) "pull" all existing program steps "up" when they are added, and none of the existing steps is deleted. In the HP12C, each new program step replaces an exisitng one. It's like the HP16C program mode is always in "isertion" mode, while the HP12C program mode is always in "replace" mode.
Hope this helps.
Edited: 20 June 2004, 3:36 p.m.