Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: boot2490 on March 03, 2012, 05:43:57 pm
-
Currently, I am using OS lists, so they are extremely large. I would like to use an appvar instead, to save space. So basically, I want to store a list in an appvar, and through AXE, refer to a certian entry in that "list" to be used in calculations. Is this possible?
-
To create an appvar, use
GetCalc("appvNAME",SIZE)->POINTER
Then to access bytes of that appvar, use:
{POINTER+ENTRY}
check out the axe manual for more stuff on that.
-
When you say you want to store a list in an appvar, do you mean you want to store TiOS List's inside of an appvar, or just store a list of 16bit numbers in an appvar?
-
I want to store numbers, in sequence, to be reffered to later, but without filler like in OS lists.
-
Then leafy's code should do what you want. To access an Appvar that has already been created, just do:
GetCalc("appvName")->Pointer
-
so the pointer is a number? and the appvar name can be typed in?
so, in
GetCalc("appvarNAME",SIZE)->POINTER
Then to access bytes of that appvar, use:
{POINTER+ENTRY}
I would type:
GetCalc("appvarAXELIST",20)->1
wait, what is pointer+entry? I'm still confused.
-
You wouldn't type in 'appv', as that is a token you get access to by pressing [2nd] and then [8]. GetCalc() is a command that returns a pointer, where that pointer is the location of the start of the appvar. Your code would look something like this to create the Appvar.
GetCalc("appvAXELIST",20)->P
The variable P now holds the location of the start of the appvar. To access the first byte of the appvar, you would do
{P}
To access the second byte of the appvar, you would do
{P+1}
And so on
-
How big do you want your numbers to be? If you only want them to be between 0-255, You can hold one number per byte. Otherwise, you will need 2 bytes per number (0-65535).
154->{P+12} will store the number 154 to the 13th byte in your appvar.
24479->{P+17}r will store the number 24479 to the 18th and 19th bytes in your appvar. The superscript 'r' tells axe to save the number as 2 bytes.