I vaguely remember how to do appvars in Axe.
I just need to save the screen i've drawn using my custom tile-drawer program.
I remember using "Getcalc("
How would I do this again...?
GetCalc("appvA")->X will find an already created appvar named "A" and store a pointer to the first byte of it's contents in X. Returns null (0) if none exist with that name.

GetCalc("appvA",256)->X will create a new 256-byte long appvar named A and returned a pointer to its data section in X.


Remember how we've been pushing you to read the commands list that comes as part of the Axe downloads? Simply reading that would've answered your question. A great virtue of learning is to research something you don't understand before you ask -- then you can either find your answer much quicker, ask less, or clarify your original questions based on your failed findings -- making feedback more helpful for you to digest.
You assume I didn't read it.
Quote:

GetCalc(PTR) Finds the object who's name is pointed to and returns a pointer to the start of its data, or zero if it was archived or not found.
GetCalc(PTR,FILE) Attempts to create a file of the OS variable who's name is pointed to so it can be read from archive. Returns 0 if the variable was not found, and non-zero otherwise.
GetCalc(PTR,SIZE) Creates an OS variable who's name is pointed to in RAM and makes it Size bytes large. Returns a pointer to the start of data, or zero if there was not enough RAM. Overwrites existing variable, even if it was in archive.

I just didn't understand the PTR, SIZE, or what to put inside of it. Which is why I was asking if Getcalc was really what I had to use.

Yes after reading around the commands list I can't find what I have to do to retrieve the data I stored.

Code:

If K=42
Getcalc("appvSTAGE",768)
Archive "appvSTAGE"
End
If K=9
Getcalc("appvSTAGE",Y0)
Copy(Y0,A,768)
End

Y0 being vars->Y-vars->Function->0
I'm trying to make and store the drawing I made into an appv and use it in another program.
So the way I see it, you want to store a picture when you press store and recall it when you press enter. Let me correct your code:


Code:

If K=42
GetCalc("appvSTAGE",768)->A
Copy(L6,A,768)
Archive "appvSTAGE"
End
If K=9
GetCalc("appvSTAGE",Y0)
Copy(Y0,L6,768)


That will store/recall a picture and copy it to/from the buffer. (L6)
Thanks parserp, I had forgotten about Copy( during the storage.
Smile
EDIT: It's not creating the appvar, but i'm sure this is the right code. Could there be something wrong with my 84+SE?
EDIT AGAIN: I solved it o.o
When storing...

Code:

:GetCalc("appvSTAGE",768)->A

Forgot the size! Very Happy
lol whoops, fixed.

You're doing better than I am! Razz
  
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 UTC - 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