Author Topic: Axe and the VAT  (Read 8847 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Axe and the VAT
« on: October 06, 2010, 07:09:06 pm »
I need an Axe program that return a pointer to the start of the VAT? Can anyone help me do that?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe and the VAT
« Reply #1 on: October 06, 2010, 07:09:57 pm »
Well since the start of the VAT is at a constant place, that should be pretty easy :D Ill go see if i can find it....

EDIT: Super ninja'd by ACagliano and Quigibo too XD
« Last Edit: October 06, 2010, 07:11:31 pm by Builderboy »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Axe and the VAT
« Reply #2 on: October 06, 2010, 07:10:12 pm »
Quigibo can. it's hex address {9830h}r. and that post i linked to contains a wealth of information
« Last Edit: October 06, 2010, 07:10:46 pm by nemo »


Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe and the VAT
« Reply #3 on: October 06, 2010, 07:25:42 pm »
Yep, because the VAT is moved around a lot, a pointer to the start of it is stored at {E9830}r. That's how you'd access it in Axe.
« Last Edit: October 06, 2010, 07:26:56 pm by Deep Thought »




Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Axe and the VAT
« Reply #4 on: October 06, 2010, 07:26:26 pm »
I'm trying to parse the VAT for DCS7 folders, and create a new folder, with a user input name and predefined contents.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe and the VAT
« Reply #5 on: October 06, 2010, 07:27:29 pm »
DCS7 folders aren't stored in the VAT. They're stored in DCS's own appvar (I think).




Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Axe and the VAT
« Reply #6 on: October 06, 2010, 07:28:47 pm »
DCS folders are stored in an appvar, right? i think it's called FLD7 or something. so i guess you'd have to loop through the vat until you find "FLD7" = (name of current entry). then you'd have found the folder appvar, but you'd need to know how DCS' folder system works within the appvar.

edit: right... why not just GetCalc("appvDCSFLDAPPV")->X?
« Last Edit: October 06, 2010, 07:29:46 pm by nemo »


Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Axe and the VAT
« Reply #7 on: October 06, 2010, 07:29:15 pm »
not according to Kerm. According to him, they are protected programs, named %FLDn

where n is a number from 00 to FF.

link to cemetech topic: http://www.cemetech.net/forum/viewtopic.php?t=5006&postdays=0&postorder=asc&start=60
« Last Edit: October 06, 2010, 07:30:16 pm by ACagliano »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Axe and the VAT
« Reply #8 on: October 06, 2010, 07:30:48 pm »
not according to Kerm. According to him, they are protected programs, named %FLDn

where n is a number from 00 to FF.

link to cemetech topic: http://www.cemetech.net/forum/viewtopic.php?t=5006&postdays=0&postorder=asc&start=60
Yup.  You can see them in CalcSys. :)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe and the VAT
« Reply #9 on: October 06, 2010, 07:33:24 pm »
Oh, never mind, then. Disregard my post ;D




Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Axe and the VAT
« Reply #10 on: October 06, 2010, 07:38:10 pm »
Could someone write a routine in Axe that parses the VAT, checks for all %FLDn files, and finds the highest value of n (n1), then creates an Axe name string,  %FLD[n1+1]? That would help me out alot.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Axe and the VAT
« Reply #11 on: October 06, 2010, 07:43:00 pm »
Could someone write a routine in Axe that parses the VAT, checks for all %FLDn files, and finds the highest value of n (n1), then creates an Axe name string,  %FLD[n1+1]? That would help me out alot.

i don't use DCS very much, but i'll see if i can do it. it may or may not be a hard challenge.. i can't really tell yet.


Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Axe and the VAT
« Reply #12 on: October 06, 2010, 07:44:35 pm »
Shouldn't be too hard the only challenge, as far as I can see, would be the parsing of the VAT. The rest is just playing with a string. I'm just not comfortable with the VAT enough to do it myself.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe and the VAT
« Reply #13 on: October 06, 2010, 08:04:55 pm »
Shouldn't be too hard the only challenge, as far as I can see, would be the parsing of the VAT. The rest is just playing with a string. I'm just not comfortable with the VAT enough to do it myself.

As nemo pointed out, Quigibo wrote a few subroutines that can parse the VAT for you. Call sub(VI) to start off. Then, check the current entry's name, which is stored backwards with the first token at sub(VN), call sub(VNX) to move to the next VAT entry, and if not at the end of the VAT, repeat.
« Last Edit: October 06, 2010, 08:06:31 pm by Runer112 »

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Axe and the VAT
« Reply #14 on: October 07, 2010, 12:11:23 pm »
If I want to store something into an appvar pointed to by Z, but start at position 1 instead of position 0, would i do

A->Z+1

or A->{Z+1