Post Reply 
42S/Free42 programming: jumping back to the last MENU after RTN
04-30-2019, 07:16 PM
Post: #1
42S/Free42 programming: jumping back to the last MENU after RTN
This has been tripping me up lately. I've got a TVM/finance program on my DM42, with assorted menus that mimic the 17BII/27S TVM menus. This works fine. All the KEYG and KEYX assignments branch to local labels within the program.

I also have a couple of programs that are useful to run within the context of doing TVM work. If I XEQ these programs from the keyboard while the TVM menus are open, the RTN at the end of the secondary program leaves the program pointer within that secondary program. Now all the menu keys spit out "Label Not Found" until I manually XEQ "TVM" again, because they're trying to branch to local labels inside the TVM program.

What's a good way to work around this? Ideally, if a program's MENU is currently displayed on screen, then an RTN with an empty return stack (i.e. inside a program run manually from the keyboard) should jump back to the most recent MENU statement and halt, but that's not how the 42S behaves. Are there any good alternatives that don't require making all the labels used for menu keys global, or doing various elaborate tricks inside any potential secondary program? Should I just attempt to patch this RTN behavior into the DM42 firmware? Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
42S/Free42 programming: jumping back to the last MENU after RTN - Dave Britten - 04-30-2019 07:16 PM



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