Post Reply 
Relabelling programs
08-02-2016, 12:23 PM (This post was last modified: 08-30-2016 01:40 PM by Marcio.)
Post: #1
Relabelling programs
Create the following program on the 35s:

Code:
X001 LBL X
X002 4
X003 +
X004 GTO X002

XEQ the program, relabel it W and then XEQ it again. The 35s will not update the GTO instruction, which is understandable, but the problem is that it won't read or recognize the new label, the display will show NONEXISTENT. For this to happen, there must be a GTO instruction in the program. Later on, for some reason I cannot explain, the 35s will recognize the program exists.

Is this an oddity or a bug?

Note that if you attempt to reproduce this, step X003 is necessary to avoid the lockup bug, which will cause all programs and data to be lost!!

Thanks
Find all posts by this user
Quote this message in a reply
08-02-2016, 06:11 PM (This post was last modified: 08-02-2016 06:16 PM by Dieter.)
Post: #2
RE: [HP-35s] Relabelling programs
(08-02-2016 12:23 PM)Marcio Wrote:  Create the following program on the 35s:

Code:
X001 LBL X
X002 4
X003 +
X004 GTO X002

XEQ the program, relabel it W and then XEQ it again. The 35s will not update the GTO instruction, which is understandable, but the problem is that it won't read or recognize the new label, the display will show NONEXISTENT.

I am not sure if I understand your problem. Enter the program X, then add a new LBL W as the second line, then delete the LBL X: everything works perfectly. The new program now is W001...W004 and the last line has correctly changed to GTO W002:

Code:
W001 LBL W
W002 4
W003 +
W004 GTO W002

However, if you remove the LBL X first, the GTO of course cannot be updated since the program now has no label at all – it does not know to which line 002 of which program it is supposed to jump. There is no GTO 0001 or GTO 0002 command. At this point the program looks like this:

Code:
0001 4
0002 +
0003 GTO X002

So the last line still reads GTO X002. As there is no such line, of course a NONEXISTENT must appear. After re-inserting a LBL W this GTO stays the way it is. How should the calculator know that some time ago this line belonged to some deleted LBL X ?

So I do not see a problem here.

Dieter
Find all posts by this user
Quote this message in a reply
08-02-2016, 06:19 PM (This post was last modified: 08-02-2016 06:21 PM by Marcio.)
Post: #3
RE: [HP-35s] Relabelling programs
I apologize if I was not clear with the explanation.

Enter program X
Execute X
Edit X and relabel it W (or any other letter of choice)
Execute W

The 35s will display NONEXISTENT although you can confirm the existence of the program labeled W by checking the memory.

If you let the program unlabeled, the memory will display LBL ;

Thank you for you time and patience.
Find all posts by this user
Quote this message in a reply
08-02-2016, 06:24 PM (This post was last modified: 08-02-2016 06:29 PM by Dieter.)
Post: #4
RE: [HP-35s] Relabelling programs
(08-02-2016 06:19 PM)Marcio Wrote:  I apologize if I was not clear with the explanation.

Enter program X
Execute X
Edit X and relabel it W (or any other letter of choice)
Execute W

The 35s will display NONEXISTENT although you can confirm the existence of the program by checking the memory.

If you do the "Edit X and relabel it W" correctly, everything is fine. First insert the new label W (after LBL X), then delete the old label X.

If you do it the other way round (delete LBL X first, then add LBL W) it cannont work – cf. my first post. The "NONEXISTENT" appears when the program tries to jump to X002 which no longer exists.

(08-02-2016 06:19 PM)Marcio Wrote:  If you let the program unlabeled, the memory will display LBL ;

Yes, that's the known behaviour.

Dieter
Find all posts by this user
Quote this message in a reply
08-02-2016, 06:30 PM
Post: #5
RE: [HP-35s] Relabelling programs
(08-02-2016 06:24 PM)Dieter Wrote:  If you do the "Edit X and relabel it W" correctly, everything is fine. First insert the new label W (after LBL X), then delete the old label X.

If you do it the other way round (delete LBL X first, then reinsert W) it cannot work – cf. my first post. The "NONEXISTENT" appears when the program tries to jump to X002 which no longer exists.

That is why. The 35s will update the GTO instruction after some time.
Find all posts by this user
Quote this message in a reply
08-02-2016, 06:34 PM
Post: #6
RE: [HP-35s] Relabelling programs
(08-02-2016 06:30 PM)Marcio Wrote:  
(08-02-2016 06:24 PM)Dieter Wrote:  If you do the "Edit X and relabel it W" correctly, everything is fine. First insert the new label W (after LBL X), then delete the old label X.

If you do it the other way round (delete LBL X first, then reinsert W) it cannot work – cf. my first post. The "NONEXISTENT" appears when the program tries to jump to X002 which no longer exists.

That is why. The 35s will update the GTO instruction after some time.

?!? – "after some time"?
If you do it correctly the GTO is updated immediately. Otherwise it cannot be updated, regardless how long you wait for it. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
08-02-2016, 06:40 PM
Post: #7
RE: [HP-35s] Relabelling programs
Well, I did not correct it myself.

But yes, it was me who created the confusion by me not adding the new label before deleting the old one.

Thanks.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 6 Guest(s)