HP-41: Reusing local labels in same program.
|
10-23-2023, 02:00 PM
Post: #1
|
|||
|
|||
HP-41: Reusing local labels in same program.
@Valentin made the suggestion the other day where a local label was reused in such a way as to be effectively a NOP. After learning a bit more on how labels are parsed, I made up program "//Double label trouble 1" to demonstrate how a duplicate label may never be seen.
Yesterday I came across the part in the HP-41CX manual where it talks about 'compiling', i.e. the offset from GTO to label being remembered after first use. This got me wondering if one set up a program to try and make it possible that a local label could be reached if it would be. I write the program, "//Double label trouble 2" this morning to demonstrate this idea. To my surprise both 'LBL 01' instances are used. The offset recorded must me attached to each GTO. More reading on my part needed. Someone else suggested the book "Extend Your HP-41", link below, which shows some other interesting uses of labels in section 6.4. These sorts of tricks are interesting to me but could lead to programs that are hard to understand and modify, particularly for a newbie. Code:
Code:
Extend your HP-41 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP-41: Reusing local labels in same program. - Jeff_Birt - 10-23-2023 02:00 PM
RE: HP-41: Reusing local labels in same program. - Garth Wilson - 10-23-2023, 08:51 PM
RE: HP-41: Reusing local labels in same program. - Valentin Albillo - 10-23-2023, 10:53 PM
RE: HP-41: Reusing local labels in same program. - Jeff_Birt - 10-23-2023, 11:23 PM
RE: HP-41: Reusing local labels in same program. - Dave Britten - 10-24-2023, 12:04 PM
|
User(s) browsing this thread: 1 Guest(s)