Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: leafy on January 23, 2011, 02:37:42 am
-
Is it even possible to calculate decimals using Axe? And if it's not, can you run BASIC programs within Axe?
-
If you want to be technical, you can do decimals in Axe, but it's essentially just inline Assembly code. The same goes for calling BASIC programs, unless you want to use a Doors CS lib.
What do you need decimals for anyway?
-
So how could you use Asm to load a BASIC program?
-
Herm well you could but you would need to write your own math routines and algorithms (at least to my knowledge). And to run BASIC programs... I believe you can do that with a simple hex code, but I don't know the code off the top of my head
o.O
Now I got ninja'd...
-
The only time I see decimals in a program is if it is a math program and in that case the speed of axe is not needed.
Edit: Xeda getting ninja'd caused me to get ninja'd
-
It is *kinda* possible to have decimals using whats known as fixed point notation. for instance, if you wanted to store 1.5 in axe, instead of storing 1.5 to A (which is impossible), you would store 15 to A, and whenever you wanted to use it, divide by 10. for example, if you wanted a sprite with two decimal points of precision, you could do something like this:
500->A //5 into A
300->B //3 into B
Pt-On(A/100,B/100,Pic1
The sprite will display at the correct location :) Now, i used x10 and x100 to make it easier to see, but you can just as easily use any number you want, based on the precision you need. The larger the number, the more precision. I always use x256 because dividing by 256 in axe is super fast :) Just a word of caution though, since you are gaining more precision in one area, you have to lose it in another. While you gain more decimals, your maximum number that you can represent is decreased.
-
Yeah, I think linking to BASiC might be easier - but where is this hex code you speak of? :D
-
You could always use Bcall(_ParsInp) to call a BASIC program. It's EF9B4A in hex, courtesy of Kerm.
-
How much precision do you need? What are you trying to do?
-
I'm making a statistics toolkit - I made one in BASIC but the menus were way too slow so I switched the interface to Axe.
If you had a prgmLINREG, how would you use Bcall(_ParsInp) to start it?
-
Fixed point might be best for that. You could always use the Menu( function for BASIC though.
As for the arguments for ParsInp, it's really complex. I'll try to find some documentation for you though.
-
The Menu( didn't have scrolling, which is really what I wanted.
I still need to know how to call a BASIC program from Axe.
-
Ok for a statistic toolkit I would definitely recomend Basic 100%, what types of menus were you using that were too slow? Its likely that you could merely code your menu's a different way to make them faster instead of using Axe, which would be a lot harder for what you want to do. However, if you want to continue to use axe, that works too, although I know of no way to start basic programs from inside an assembly program
and also just try to keep an eye on the double posting ;)
-
Well what I'm doing doesn't require that much precision - it's just a bunch of definitions and a couple of programs.
I decided to do this since Zstats was really arbitrary in its definitions and didn't help much on tests and stuff.
-
If that's it, then don't go to the trouble of interfacing Axe and BASIC. I can't even find the documentation to tell you haw complex it is.
-
Why not just make the menus in axe (and other things that need asm speed) and then just have the BASIC program call the assembly program instead of the other way around.
-
Hahaha, nice! I love it when sanity makes its way into forums!
-
Sanity is not allowed!
Lol, I like how no one else pointed out the obvious.
-
* Facepalms self and everybody else *
XD
-
Love it when that happens XD
So that would work.
-
@Quigbo Yeah I just got that brilliant idea after going to bed =.=