Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: ACagliano on August 31, 2010, 11:19:22 am

Title: All Vars that Meet Criteria
Post by: ACagliano on August 31, 2010, 11:19:22 am
Is there a way in Axe to somehow return a pointer to a variable, not based on a search by name, but instead by a search by certain criteria, like part of a name, or bytes within a file? If not, could we think about including that?
Title: Re: All Vars that Meet Criteria
Post by: Quigibo on August 31, 2010, 05:39:40 pm
It's possible, but you have to know how to transverse the symbol table which is a very low level thing to do.  It can be done in pure Axe yes, but it requires a lot of knowledge of how TI organizes the file system.  You'll have to look at the Developer's SDK (download from TI's website) to learn more about it but be warned that that guide is written for assembly programmers and what you're trying to do is a little tricky.
Title: Re: All Vars that Meet Criteria
Post by: ACagliano on September 01, 2010, 10:26:47 am
Is there a way, not immediately, but in the future, for you to include a command that does that?
Title: Re: All Vars that Meet Criteria
Post by: Runer112 on September 01, 2010, 04:41:57 pm
It would be very difficult to make a routine that can search based on many different possible distinctions. Although still not too easy, it would be a good amount less difficult to make a routine to search for a specific distinction, such as searching for appvars with a certain value as the first two bytes of data to designate it as a level for a certain game. Did you have a specific distinction in mind?
Title: Re: All Vars that Meet Criteria
Post by: ACagliano on September 01, 2010, 04:44:36 pm
Well, there are two.

1. Based on first 2 bytes is good.

2. Simply returns pointers to all PROGRAM files on the calc.

**Actually, a routine that simply returns a STRING from #2 would be fine, not separate pointers.