Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 May, 2013, 20:14:41 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Appvars, and referring to a certian point in one? -  (Read 266 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
boot2490
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 05:54:45
Date Registered: 27 February, 2011, 07:39:51
Location: Pittsburgh, PA
Posts: 605


Topic starter
Total Post Ratings: +18

View Profile WWW
« on: 04 March, 2012, 00:43:57 »
0

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?
Logged

I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler for Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.
leafy
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 00:26:27
Date Registered: 26 December, 2010, 05:27:03
Location: the ninth circle of hell
Posts: 1545


Total Post Ratings: +371

View Profile WWW
« Reply #1 on: 04 March, 2012, 00:44:47 »
0

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.
« Last Edit: 04 March, 2012, 00:51:22 by leafy » Logged

In-progress: Blastlabs, TMJO, qb?, VVVVVV?
Finished: Tag, Tap, MFQT, Nyan
Dead: Graviter
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 19:29:47
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #2 on: 04 March, 2012, 00:44:58 »
0

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?
Logged

boot2490
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 05:54:45
Date Registered: 27 February, 2011, 07:39:51
Location: Pittsburgh, PA
Posts: 605


Topic starter
Total Post Ratings: +18

View Profile WWW
« Reply #3 on: 04 March, 2012, 00:57:25 »
0

I want to store numbers, in sequence, to be reffered to later, but without filler like in OS lists.
Logged

I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler for Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 19:29:47
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #4 on: 04 March, 2012, 00:58:44 »
0

Then leafy's code should do what you want.  To access an Appvar that has already been created, just do:


1
GetCalc("appvName")->Pointer
Logged

boot2490
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 05:54:45
Date Registered: 27 February, 2011, 07:39:51
Location: Pittsburgh, PA
Posts: 605


Topic starter
Total Post Ratings: +18

View Profile WWW
« Reply #5 on: 04 March, 2012, 02:19:52 »
0

so the pointer is a number? and the appvar name can be typed in?
so, in
Quote
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.
Logged

I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler for Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 19:29:47
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #6 on: 04 March, 2012, 02:25:38 »
0

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.


1
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


1
{P}

To access the second byte of the appvar, you would do


1
{P+1}

And so on
Logged

C0deH4cker
LV5 Advanced (Next: 300)
*****
Offline Offline

Gender: Male
Last Login: 19 December, 2012, 22:22:42
Date Registered: 18 October, 2011, 23:19:08
Location: $9D95
Posts: 258


Total Post Ratings: +10

View Profile WWW
« Reply #7 on: 04 March, 2012, 03:26:29 »
0

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.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.249 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.