Author Topic: Axiom SDK For Developers  (Read 24495 times)

0 Members and 2 Guests are viewing this topic.

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Axiom SDK For Developers
« Reply #75 on: March 27, 2011, 03:09:13 am »
Do axioms generally run faster than generic Axe commands?
In-progress: Graviter (...)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axiom SDK For Developers
« Reply #76 on: March 27, 2011, 03:09:17 am »
So is there currently a way to write an Axiom for something like Pt-On(_x,_y,_ptr)r?

That routine already exists, why would you want to write a new one? Also note that in most cases, you can't use tokens that Axe already uses for the built-in commands in your Axioms.


Do axioms generally run faster than generic Axe commands?

There are a few things that Axioms can't be used for, like control structures and auto optimizations, so these cannot be compared. For everything else, the speed of the command is simply dependent on the assembly code of the routine. If you took the code for a built-in Axe command and included it in an Axiom, both versions would result in exactly the same compiled code and run at the same speed. For other routines, the speed is simply dependent upon what the routine does, how well it was coded, and how much the programmer was aiming for speed over size.
« Last Edit: March 27, 2011, 03:17:44 am by Runer112 »

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Axiom SDK For Developers
« Reply #77 on: March 27, 2011, 03:11:22 am »
I know, I meant the radians symbol as a suffix to the command and have it execute a different routine
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axiom SDK For Developers
« Reply #78 on: March 27, 2011, 03:22:26 am »
I know, I meant the radians symbol as a suffix to the command and have it execute a different routine

Yes. The fifth byte of every Axiom command header details specifics about how the routine is called. Here is what AxiomSDK.txt says about this byte of the header:

Code: [Select]
;____FIELD 4____
;Description:     Command type
;Size:            1 byte
;Bits:            bit 0 ==> Subroutine instead of inline routine
;                 bit 1 ==> Command requires the r modifier
;                 bit 2 ==> Command requires the rr modifier
;                 bit 3 ==> Additional argument comes before a store token

So if bit 1 of this byte was set, your routine would require one r modifier.

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Axiom SDK For Developers
« Reply #79 on: March 27, 2011, 03:56:45 am »
Ohhhhhhhhh okay. That makes perfect sense now. Thanks! :D
There's something about Tuesday...


Pushpins 'n' stuff...


Ashbad

  • Guest
Re: Axiom SDK For Developers
« Reply #80 on: March 27, 2011, 09:18:44 am »
Do axioms generally run faster than generic Axe commands?

Depends on the coding you did -- it's basically just a inline or subroutined form of assembly, so It's really hard to make a speed comparision, especially when your axioms will most undoubred have different commands at different speeds from the axe commands.

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: Axiom SDK For Developers
« Reply #81 on: March 27, 2011, 10:40:23 am »
I know, I meant the radians symbol as a suffix to the command and have it execute a different routine

But remember Pt-On(X,Y,PTR)r exists too.
« Last Edit: March 27, 2011, 10:40:29 am by Deep Thought »




Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Axiom SDK For Developers
« Reply #82 on: March 28, 2011, 06:02:16 am »
I know, I meant the radians symbol as a suffix to the command and have it execute a different routine

But remember Pt-On(X,Y,PTR)r exists too.

I know, I was just using that as an example command that uses the r suffix.
There's something about Tuesday...


Pushpins 'n' stuff...


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: Axiom SDK For Developers
« Reply #83 on: March 28, 2011, 09:23:26 am »
Oh, got it.