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

0 Members and 3 Guests are viewing this topic.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: Axiom SDK For Developers
« Reply #60 on: August 18, 2010, 06:43:23 pm »
Could we host it on here? That would be nice, in case eem's server crashed and he lost it. It might be the only copy left!
Only online copy, anyway- you can still download it from ticalc.org in html and chm format.



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

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: Axiom SDK For Developers
« Reply #61 on: August 20, 2010, 12:25:24 pm »
Could we host it on here? That would be nice, in case eem's server crashed and he lost it. It might be the only copy left!
Er... his host is still up for me. I can browse ASM In 28 days mirror fine. Freehostia just have crappy uptime when it comes to free hosting (as they say, you get what you pay for x.x)
« Last Edit: August 20, 2010, 12:25:39 pm by DJ Omnimaga »

Ashbad

  • Guest
Re: Axiom SDK For Developers
« Reply #62 on: March 18, 2011, 04:59:38 pm »
one question: when getting the variables r1 to r6 from the input, in what order are they received?  Is HL holding r1, and the rest are in order after that in the stack?  Or is it r6 in HL and opposite order in the stack?

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 #63 on: March 18, 2011, 06:47:27 pm »
one question: when getting the variables r1 to r6 from the input, in what order are they received?  Is HL holding r1, and the rest are in order after that in the stack?  Or is it r6 in HL and opposite order in the stack?

Axioms don't use r1-r6. r1-r6 are actual memory locations, like the A-Z vars, while the arguments of a function (that's what you're talking about, right?) are stored in this way:

The first argument is deepest in the stack, the second the second deepest, etc. Then the second-to-last argument is on top of the stack (first out), and the very last argument is in HL. As an example, say you have a function nDeriv(:

nDeriv(0,1,42,1337,9001)

When the Axiom routine takes control, 9001 is in HL. Doing a POP HL puts 1337 in HL; POPing again gets 42, then 1, then 0.

Ashbad

  • Guest
Re: Axiom SDK For Developers
« Reply #64 on: March 18, 2011, 07:41:46 pm »
Thanks DT :D

also, how do subroutines work?  Do they allow for more than the 255 byte limit of routines?

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 #65 on: March 18, 2011, 07:42:47 pm »
Thanks DT :D

also, how do subroutines work?  Do they allow for more than the 255 byte limit of routines?

What kind of subroutines? sub( subroutines in Axe, Axe command routines (such as for DispGraph), or Axiom subroutines?




Ashbad

  • Guest
Re: Axiom SDK For Developers
« Reply #66 on: March 18, 2011, 07:44:48 pm »
no, in an axiom quigibo states that you can have your normal assembly code for your axiom routine, but he also mentions subroutines applying to the regular routines (but without much explanation).

can you fill me in on how these work?

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 #67 on: March 18, 2011, 07:49:05 pm »
no, in an axiom quigibo states that you can have your normal assembly code for your axiom routine, but he also mentions subroutines applying to the regular routines (but without much explanation).

Wait, where is this?




Ashbad

  • Guest
Re: Axiom SDK For Developers
« Reply #68 on: March 18, 2011, 07:50:45 pm »
Code: [Select]
;Sqrt(num)
.db $FF                 ;Shells
.db tSqrt,0             ;Token
.db 1                   ;Replacement Type
.db 1                   ;Arguments
.db __SqrtEnd-1-$       ;Subroutine Size
ld a,-1                 ;Subroutine Command
ld d,a
ld e,a

as compared to

Code: [Select]
.db $FF                 ;Shells
.db tDiag_off,t2ByteTok ;Token
.db 0                   ;Replacement Type
.db 0                   ;Arguments
.db 7                   ;Size
B_CALL(_RunIndicOff)    ;Command
res 5,(iy+0)

I'm positive they have different purposes, but I have no idea how they work differently.

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 #69 on: March 18, 2011, 07:55:24 pm »
Oh, I see. It works like this:

First of all, an Axiom is a definition for a command (which you know). You could define nDeriv( to run a custom routine, for example.

Axe lets you choose whether you want your Axiom to exist as subroutines at the end of the program instead of being inserted in each place where the Axiom is called.

For example, say that routine you wrote for nDeriv( takes up 300 bytes. It would be extremely inefficient to stick that 300-byte code at every point nDeriv( is called in the program, so you tell Axe to make this a subroutine that goes at the end of the program (like sin( and DispGraph) that gets CALLed at every point nDeriv( appears.

Whereas if you have a different command that does something really simple (like in 2 bytes), you might as well not make it a subroutine and instead stick those two bytes wherever it's called.
« Last Edit: March 18, 2011, 07:55:37 pm by Deep Thought »




Ashbad

  • Guest
Re: Axiom SDK For Developers
« Reply #70 on: March 18, 2011, 07:57:59 pm »
ah, thanks for the clarification :)

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Axiom SDK For Developers
« Reply #71 on: March 19, 2011, 12:17:21 am »
Could we host it on here? That would be nice, in case eem's server crashed and he lost it. It might be the only copy left!
Er... his host is still up for me. I can browse ASM In 28 days mirror fine. Freehostia just have crappy uptime when it comes to free hosting (as they say, you get what you pay for x.x)
It's no longer on freehostia, although freehostia will redirect you :) It's now on eeezor.ec3club.tk which is much faster :)
/e

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: Axiom SDK For Developers
« Reply #72 on: March 19, 2011, 03:09:12 am »
By the way Ashbad, the old Axiom system is no long supported so those don't really apply, make sure you are using the SDK that came in the Axe 0.5.0 zip file.  Also, there isn't a 255 byte limit now, they can be any size.
« Last Edit: March 19, 2011, 03:09:48 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Ashbad

  • Guest
Re: Axiom SDK For Developers
« Reply #73 on: March 19, 2011, 06:59:05 am »
thanks quigibo ;) never thought to look there for the updates :P

also, congrats on making the axiom system!  I'm extremely impressed on how it works -- yesterday I got an 8 level grayscale one to work.  It's so easy to make and use Axioms -- I LOVE it!

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Axiom SDK For Developers
« Reply #74 on: March 27, 2011, 03:06:58 am »
So is there currently a way to write an Axiom for something like Pt-On(_x,_y,_ptr)r?
There's something about Tuesday...


Pushpins 'n' stuff...