Author Topic: Data  (Read 7583 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Data
« Reply #15 on: October 14, 2010, 02:31:59 am »
He means like DispGraph.  The code for dispgraph is say 100 bytes, so to save space Axe puts it at the bottom of your program, and whenever you use DispGraph in your program, it calls it (kinda like sub()) from the bottom to save space

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Data
« Reply #16 on: October 14, 2010, 03:29:15 am »
Oh ok, ty for the info.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Data
« Reply #17 on: October 14, 2010, 03:33:55 am »
For a more technical reason why the parser works this way, I'll explain how each pass in the parser works:

First, the entire program is parsed EXCEPT for data and AxCalls.  Whenever it encounters an AxCall, it writes a "call XXXX" to the executable and moves on because the actual location of the routine can't be determined until the size of the executable is known.  Same with data.  If you used Str1 somewhere in your code it will replace the value of that pointer with XXXX as well and just continue as if nothing was wrong.  By the end of the first pass, the program is completely parsed but with a bunch of holes that need filling.

Then, the second pass happens.  The compiler does exactly the same thing, but in exactly the opposite way.  It scans through the program and anything that is not an AxCall or data is ignored (since it was already written in the first pass) but when it encounters one of these holes, it can now add that data/routine to the end of the program since we know where that is now.  It then takes the address of that location it just added and uses that to fill in the XXXX with the correct value.  It does this until the entire program is parsed and the compiling is complete.

That's why it would be difficult to add the AxCalls before the data, I would have to change the 2nd pass to only fill in the AxCalls and then add a 3rd pass to only fill in the data and tack that on to the end of the program.
« Last Edit: October 14, 2010, 03:36:36 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Data
« Reply #18 on: October 14, 2010, 03:37:16 am »
Ah right, I guess it's better to leave things as they are, then X.x. I wouldn't mind longer compiling personally, but on a regular 83+ it might be a bit too long x.x

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: Data
« Reply #19 on: October 14, 2010, 09:33:24 am »
Ah right, I guess it's better to leave things as they are, then X.x. I wouldn't mind longer compiling personally, but on a regular 83+ it might be a bit too long x.x

It's not long on a plain 83+ either, especially now that Axe actually quits right after compiling. But whichever's easier, Quigibo.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Data
« Reply #20 on: October 14, 2010, 09:48:13 am »
Well I stiill noticed some long compiling times sometimes on 83+. I assume with a 20 KB large game it might be insane while debugging x.x

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Data
« Reply #21 on: October 14, 2010, 10:51:56 am »
maybe this could be changed for 1.0? it would definitely be worth any extra time.
then again, if it's too much work for you that's perfectly fine.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Data
« Reply #22 on: October 14, 2010, 11:13:11 am »
How bout its an option :) That way the user can decide.  Hmm although that idea probably would take a crapload of extra code x.x

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Data
« Reply #23 on: October 14, 2010, 05:23:25 pm »
Yeah we don't want Axe to end up being like one entire page larger just because of this x.x

Maybe in the future there could be  Axe Parser Lite and Axe Parser Full, though.

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: Data
« Reply #24 on: October 14, 2010, 07:06:08 pm »
Yeah we don't want Axe to end up being like one entire page larger just because of this x.x

Maybe in the future there could be  Axe Parser Lite and Axe Parser Full, though.

That might be hard to keep updated :P

Actually, it's not that important. I could just compile as an app.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Data
« Reply #25 on: October 14, 2010, 11:45:02 pm »
Yeah that's the main issue x.x

It was hectic to update ROL series because there's a french and english version for each game.