From: Andreas Möller on 17 Sep 2009 04:08 Hello group, does somebody know, how one can create a named ROMPTR (xNAME - a command that is visible in the library menu) that is not allowed in a USER-RPL ? This is what Id like to accomplish: Create a library with a xNAME and if this xNAME is used in a USER-RPL program the command line parser should give an error. Example: << My_xNAME >> [ENTER] -> the command line parser errors with "Invalid Syntax" and the cursor is placed behind the invalid My_xNAME in the command line. Can the Property-List Bits in front of a ROMPTR be used for this ? TIA, Andreas http://www.software49g.gmxhome.de (remove the NOSPAM for a direct answer)
From: Yann on 17 Sep 2009 13:35 Do you mean you want to create a Library Command which can be triggered using the Library menu only, but not called by any UserRPL program, including any direct call on the stack ? In that case, you may separate your library program into 2 parts (visible - invisible). The visible part (with the name) is only there for : 1) checking that the triggering is valid. Typical example : - the library menu is the current menu, - the key corresponding to the library command has been pressed - return stack has no reference to an ongoing ID program - etc. 2) if ok, then call the invisible part, which starts the real job. The invisible part, of course, will remain unaccessible from UserRPL. Regards Yann
From: andreas_moellerNOSPAM on 17 Sep 2009 14:00 Hi Yann, that could do the job I need. Do you mind giving an example ? Regards, Andreas
From: Yann on 20 Sep 2009 16:53 by the way, i was thinking : there might be a more straightforward by going the Assembler route and testing directly if the expected key is being pressed right at the start. Normally, this should be fast enough to not even be noticed by the user. Do you have some experience at programming in saturn assembler ?
From: andreas_moellerNOSPAM on 20 Sep 2009 17:57 Hi Yann, > Do you have some experience at programming in saturn assembler ? Yes, one could say though although I did not bother much with key input/output so far. > and testing directly if the expected key is being pressed > right at the start. Hmm, the key could be any of the six soft menu keys and also the command name could be entered through the command line. Easiest is to use the sNAME directive and add an invisible space character at the end like sNAME NameIt NameIt\20 So the real name of the xNAME would be NameIt\20 which can not be entered and the command line parser will always create NameIt from it which is not the ROMPTR. However, no message is generated, like "not allowed as a command" or whatever. Thanks for you thoughts, if you come up with a ML solution I would be most interested. Regards, Andreas
|
Next
|
Last
Pages: 1 2 Prev: transferring HP48 program cards to HP50G Next: Upgrading the ROM from SD card |