What of the three features listed above would you like to see most?
Scanner
 41%  [ 5 ]
Real Time Shields
 33%  [ 4 ]
RunProgram Hook
 25%  [ 3 ]
Total Votes : 12

No. Only pointers to the data itself. I'm sure someone on omnimaga could find a way to reference the VAT by referencing its start directly. The traditional pointers will not.

Now in your folder names, what is the % ? And must it be included in the name. And is it 8 bytes including that, or 8 bytes plus that.

Once the rest is done, I'll give it a try.

Edit: Here's some info from omnimaga about the VAT in Axe?

http://ourl.ca/7202

Here's the meat of it:

In Axe, the two-byte data element {E9830}r returns a pointer to the start of the VAT. In Axe the "r" means two bytes. So {E9830} would be a one-byte number and {E9830}r is a two-byte number.

Quigbo, the designer of Axe Parser has a routine that parses the VAT and return info about current entry.


Code:
:.Initialize Vat pointer (using P as pointer)
:Lbl VI
:{E9830}r->P
:Return
:
:.Get Next Entry
:.Returns 1 if End of Vat or 0 otherwise
:Lbl VNX
:P-{P-6}-7->P>={E982E}r
:Return
:
:.Get current entry type
:Lbl VT
:{P}
:Return
:
:.Get Pointer to current entry data
:Lbl VD
:{P-4}rr
:Return
:
:.Get archive status (0 is RAM, non-zero is archive)
:Lbl VA
:{P-5}
:Return
:
:.Get Pointer to current name length
:Lbl VNL
:{P-6}
:Return
:
:.Get Pointer to current entry name (backwards)
:Lbl VN
:P-7
:Return


And, the way the VAT looks.



Code:
Offset:     -14 - -7            -6          -5          -4               -3          -2             -1         0
Item:          name         name length     page      addr high       addr low     version       reserved    type


Where type is 05 for a program and 06 for a protected program. Reserved is always 0. Version changes, but 1 is usually normal. The address low and high are where you can find the program. Page is the flash page, or 0 if in ram. The name length is how many characters and in the name and the name is name.

Then when you follow out that address to a location in ram, you are given the start of the program. The first two bytes are the size bytes. Then the program data. Then the next program in ram. There is nothing ending the program. There is also nothing marking the program aside from it's size bytes, which don't look any different than normal bytes.

And that is the VAT.

Now, from this, can you direct me to the T2 byte?
Well, the "Type" byte is usually called the T byte, and the "T2" or "Type 2" byte is what's labeled as "Reserved" (-1) there. Once again, the data and VAT entry of a program are disjoint, so the 8 bytes is just the name of the folder, ie, the contents of the program named %FLD[number]. % is the literal percent character.
So based on this data, the 8 byte name of folder goes from

Offset -14 to -7

The Reserved byte goes form

Offset -1 and should be 01

The type byte goes from

Offset 0 and should be 6, for protected program.

And the program's contents should be %FLD[number].


How do I specify what stuff goes into that folder?

Edit: There should be separate steps for creating the folder and specifying programs to be in that folder, am I right? What does the VAT need to have? Then what needs to be changed in the program to make it in a folder?

If I'm catching you right, the T2 byte on a program specifies that it is in a folder. Does that value need to match the folder number?

And to actually make the folder, all I need to do is make a protected program called %FLD[number], right?
ACagliano wrote:
So based on this data, the 8 byte name of folder goes from

Offset -14 to -7
No. The five-byte name of the folder program variable goes from -7 to -11 inclusive, "[number]DLF%" looking from low mem to high.

ACagliano wrote:
The Reserved byte goes form

Offset -1 and should be 01
correct.

ACagliano wrote:
The type byte goes from

Offset 0 and should be 6, for protected program.
correct.

ACagliano wrote:
And the program's contents should be %FLD[number].
. Wrong. It should be BLAST5[null][null].

ACagliano wrote:
How do I specify what stuff goes into that folder?
You set its T2 byte to the [number] of the folder.

ACagliano wrote:
Edit: There should be separate steps for creating the folder and specifying programs to be in that folder, am I right? What does the VAT need to have? Then what needs to be changed in the program to make it in a folder?
See above.

ACagliano wrote:
If I'm catching you right, the T2 byte on a program specifies that it is in a folder. Does that value need to match the folder number?
. Yes; see above.

ACagliano wrote:
And to actually make the folder, all I need to do is make a protected program called %FLD[number], right?
Correct. And in that program you need "BLAST5[null][null]".
Ok, and if i wanted another program, an arbitrary program AAAAA, I would need the program to contain

BLAST5[null][null]AAAAA[null][null][null]. I get it now. Thank you much.
ACagliano wrote:
Ok, and if i wanted another program, an arbitrary program AAAAA, I would need the program to contain

BLAST5[null][null]AAAAA[null][null][null]. I get it now. Thank you much.
No, not at all. If you want the NAME of the folder to be BLAST5, you put BLAST5[null][null] in the %FLD[number] program. For every program you want to put in the BLAST5 folder, you do NOT edit the %FLD[number] program; instead you simply set the T2 byte of that program to [number].
OH. fail. I should have known that.

I'm currently attempting to code in Axe to parse the VAT for folders. I'll let you know how it works out.
ACagliano wrote:
OH. fail. I should have known that.

I'm currently attempting to code in Axe to parse the VAT for folders. I'll let you know how it works out.
No problem, it's sort of a difficult set of concepts for a non-ASM programmer to wrap his or her head around. I look forward to hearing how it turns out.
Ok Kerm, I have a program parsing the VAT for program names. They actually did not appear when i put in a condition as type byte 6, protected program. But when I put it as type 5, program, they did.
ACagliano wrote:
Ok Kerm, I have a program parsing the VAT for program names. They actually did not appear when i put in a condition as type byte 6, protected program. But when I put it as type 5, program, they did.
You really should be checking for both protected and unprotected programs in an ideal world.
Kerm, help!! lol. I'm having issues creating it in Axe.

My Axe routine always returns %FLDe, regardless of how many new folders I create, even though if I make a new folder that last character should change.
You need to search through the VAT and find all %FLD* programs, where * is any byte value, then create the new folder with number max(*) + 1. There's no automatic mechanism within Axe or the TI-OS for doing that for you. Smile Are you doing that?
Yes, but something's wrong with the code I'm using. Either its failing to parse the VAT, or it's not taking the max value, but a constant. I'm trying to figure out where its going wrong.

Fixed it: It was merely an issue of using a Repeat loop instead of a While loop.
ACagliano wrote:
Yes, but something's wrong with the code I'm using. Either its failing to parse the VAT, or it's not taking the max value, but a constant. I'm trying to figure out where its going wrong.

Fixed it: It was merely an issue of using a Repeat loop instead of a While loop.
Ah, excellent to hear. So can you successfully create a folder in Doors CS yet?
I so far have returned a pointer to a name string containing the name of the dcs folder program. From there, its easy to create it. I'll keep you posted.

Now, do I have to change the type byte to 6, or can it stay 5?

And for placing programs in a folder, I'm changing the reserved byte of that program to the same number of the folder, right?
ACagliano wrote:
I so far have returned a pointer to a name string containing the name of the dcs folder program. From there, its easy to create it. I'll keep you posted.

Now, do I have to change the type byte to 6, or can it stay 5?

And for placing programs in a folder, I'm changing the reserved byte of that program to the same number of the folder, right?
Precisely. Smile It just occurred to me how awesome a CreateFolder and MovePrgmToFolder pair of functions would be for inclusion in the DCSB Libs so that even BASIC programs could put themselves and their subprograms into a folder... O_O
What about the type byte for %FLDn itself. Should I leave it 5 or make it 6?

And thats an awesome idea.
ACagliano wrote:
What about the type byte for %FLDn itself. Should I leave it 5 or make it 6?

And thats an awesome idea.
It doesn't really matter either way; do as you wish.
And, once I get the routine working, I'll bounce it off to you and let you test it some. To see if it works properly.

Will there be any instance in which the [number] part of the folder program name will pass FFh ?

And, will there be any stability issues if I attempt to change the reserved byte of a program (move it to a folder) while that program is running?
ACagliano wrote:
And, once I get the routine working, I'll bounce it off to you and let you test it some. To see if it works properly.

Will there be any instance in which the [number] part of the folder program name will pass FFh ?
Only if the user already created 253 folders, which I think is extremely unlikely.

Quote:
And, will there be any stability issues if I attempt to change the reserved byte of a program (move it to a folder) while that program is running?
There shouldn't be.
  
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
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
» View previous topic :: View next topic  
Page 5 of 8
» 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