Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: nikitouzz on February 25, 2013, 01:42:56 pm

Title: [AXE] help ?
Post by: nikitouzz on February 25, 2013, 01:42:56 pm
Hi in one programme in axe, i want wrtie this line :X-9??sub(XXX,r1,r2,r3,r4,r5,r6) when XXX is a routine in other programme compiled by the axe.

(I can't fusion the 2 programme)
Title: Re: [AXE] help ?
Post by: Matrefeytontias on February 25, 2013, 01:44:33 pm
And the question is ? <_<
Title: Re: [AXE] help ?
Post by: nikitouzz on February 25, 2013, 01:46:03 pm
sorry, "how to make this ?"
Title: Re: [AXE] help ?
Post by: Matrefeytontias on February 25, 2013, 02:26:09 pm
There are two ways : a simple way that actually works, and a very hard one I just thought about so I'm not sure if it works.

Simple way : follow the tutorial about my PageSwap axiom in the "Tutorials" sub-forum of Omnimaga. Yeah, I said "the easy way" ;D

And the very hard and experimental way : in the program where you define the function you want to use, follow these steps :Then, run the program once, so the appvar holding the addresses is created.

Back to your original program, follow these steps :
Here's a quick example of the last method :

:.HOLDFUNC
:
:GetCalc("appvADDR",2)->A
:LFunc1-E9D93->{A}r
:.other code
:
:Return
:Lbl Func1
:...
:End

:.USEFUNC
:Return!If GetCalc("appvADDR")->A
:Return!If GetCalc("prgmHOLDADDR")->B
:
:({{A}r+B}r)(parameters)


I'm absolutely not sure about it working or not, I thought I got mad or something. If it actually works, I'll write a tutorial about it ;D

And please other members that are reading this thing (if any), please explain your opinions, I'll need them and it'll also help Nikitouzz :P
Title: Re: [AXE] help ?
Post by: nikitouzz on February 25, 2013, 02:29:26 pm
O_o thanks there no exist one simple methode ?
Title: Re: [AXE] help ?
Post by: Matrefeytontias on February 25, 2013, 02:31:44 pm
Nope, as far as I know there are only these two methods (only one involving programs and not apps). But maybe I'm wrong, so you'd better point thepenguin77 or Runer112 to this topic.
Title: Re: [AXE] help ?
Post by: Streetwalrus on February 25, 2013, 03:03:53 pm
If your main prog is an app, then there is a small hex code that can run programs directly. ;) http://ourl.ca/8800
It's pretty simple to set up, but ONLY works from an app. Your target prog can be an appvar, though.
Title: Re: [AXE] help ?
Post by: nikitouzz on February 25, 2013, 03:05:09 pm
i know but i can't use the app for the moment.
Title: Re: [AXE] help ?
Post by: Streetwalrus on February 25, 2013, 03:10:38 pm
Why ?
Title: Re: [AXE] help ?
Post by: nikitouzz on February 25, 2013, 03:13:07 pm
Because I want put 1000/2000 bit into one programme for the routines and i don't make one app for 2000 bit max...
Title: Re: [AXE] help ?
Post by: Streetwalrus on February 25, 2013, 03:18:24 pm
The link I posted was for the app to be the main program.
Also, you can "relocate" your code : copy the routine to a free RAM area (L1-L6) and then do (Lx)(args). Of course, they're limited in size but hey !, why won't we try it ? :P
Title: Re: [AXE] help ?
Post by: nikitouzz on February 25, 2013, 03:19:34 pm
sorry but i need one programme ^^
Title: Re: [AXE] help ?
Post by: Matrefeytontias on February 25, 2013, 03:33:53 pm
Use the method I said so. Even if it's a PITA, I can't think of any other solution :P
Title: Re: [AXE] help ?
Post by: Runer112 on February 25, 2013, 07:06:09 pm
Why can't the two programs be combined? Unfortunately the OS doesn't really allow for programs to call routines in other programs, so there is no simple way to do it.
Title: Re: [AXE] help ?
Post by: nikitouzz on February 27, 2013, 07:43:06 am
because i need 10-11 routine for X programme Xe[15,+oo[ and if i combin all the programm it's too large...
Title: Re: [AXE] help ?
Post by: Matrefeytontias on February 27, 2013, 08:11:10 am
I repeat that there are no other options that the two I told you some posts ago -_-