Hello, I wanted to ask if it is possible to call a label which is stored into an appvar, so more than one program could use the same function/Label.

A bit like that (it doesn´t work)

Code:
iA
GetDataPtr(Open(“APPVAR“,“r“))→PTR  //this returns a pointer to the first byte of the label in the appvar
Call PTR


Thank you Smile
Frederik wrote:
Hello, I wanted to ask if it is possible to call a label which is stored into an appvar, so more than one program could use the same function/Label.

A bit like that (it doesn´t work)

Code:
iA
GetDataPtr(Open(“APPVAR“,“r“))→PTR  //this returns a pointer to the first byte of the label in the appvar
Call PTR


Thank you Smile


I don't think it would be possible (correct me if I'm wrong), I think the best thing to do is to create an "include" program instead, sort of like in C.
Would I copy the include-program or is it possible to execute code from it with another program, so it would take less memory, when the code is needed from more programs?
You could use convbin to compress your program so it takes up less room on the calculator. The reason you cannot call things in an appvar is because ICE expects to be run from usermem at an absolute address. You might get away with specially crafted assembly that uses position independent code and just rely on relative addressing, but that sounds annoying.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement