TI-GCC Library R1.5
Posted by Nick on 29 March 2000, 22:59 GMT
Zeljko Juric just notified me through email that TI-GCC Library Release 1.5 has been released. I'm lazy and it's spring break, so let's just copy his email at length. New updates include: - Floating point support is implemented. For this purpose, a new header file timath.h is introduced, with 86 new functions, four macro constructors and a lot of constants and predefined types.
- Basic support for the symbolic calculations (including symbolic algebra and calculus) is also implemented. For this purpose, a new header file estack.h is introduced. It contains 26 functions for manipulations with the expressions stack (in the near future, I plan about 50-100 new functions in this header file).
- SetPlane function from gray.h now works correctly in "Doors" mode.
- Grayscale support on Hardware Release 2 calculators is now stable. And, grayscale support now autodetects the hardware version!
- Now you can make programs which return a result to the TI-Basic, i.e. which act like TI-Basic functions.
- Frequently Asked Questions are added to the documentation.
Thanks to Zeljko for letting us know. This looks like a great help to the developers who are programming for 68K-based calculators.
|
|
|
The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.
|
|
Re: TI-GCC Library R1.5
|
CrazyBillyO
(Web Page)
|
I love this stuff. Not that I use tigcc, just love it when people do great things like this. Too nifty.
I don't see anybody else commenting on this yet... (fc?)
|
|
29 March 2000, 23:10 GMT
|
|
Re: TI-GCC Library R1.5
|
indif69
|
Finally I can write a real ASM Drugwars game. Woo hoo. I needed it to calculate an appropriate amount of interest on $$ from the loan shark
|
|
29 March 2000, 23:29 GMT
|
|
Re: TI-GCC Library R1.5
|
jaymz
|
This is great news. Now I can make math functions that run 100x faster than basic. Oh, and uh... writing games should now be easier. I think I'm gonna try it out right now
|
|
29 March 2000, 23:49 GMT
|
|
|
|
|
Re: Re: TI-GCC Library R1.5
|
Zeljko Juric
(Web Page)
|
I am not so sure that mathematics can be 100x faster than in BASIC. It will be faster, but don't expect such great factor. Look for example statement like b=sin(a). In both Basic and C (and even in assembler) it will call TIOS "sin" function, and if it is slow, nothing can help. Note that in math programs the greatest time consumers are just slow TIOS subroutines, which can't be avoided even in ASM (expect if you want to make better ones by yourself).
I remembered that before 15 years I have on my "ZX Spectrum" two compilers which translates BASIC to ASM: one with only integer support, and one with floating point support. First one introduces increase in speed by factor 300-900, but second one introduces increase in speed by factor 3-8.
If you want to make a really fast game, listen my hint: avoid floating points in games as much as possible, especially in tight loops. Everything which can be integer need to be an integer. Many floating values may be avoided by scaling with some factor. So, use floats only when really necessary. But, if you write math or engineering application, you very probably can not avoid floats.
|
|
30 March 2000, 08:10 GMT
|
|
8 Months
|
jamin
|
Finally, Sweeeet!!
Grayscale for my 89 hw2 :)
For the last eight months I have been deprived of grayscale
Speaking for all hw2 owners
Thank you
|
|
30 March 2000, 04:16 GMT
|
|
Re: TI-GCC Library R1.5
|
Kevin Goodsell
|
I am so thrilled about this that I had to register a username just so I could say how thrilled I am! I love TI-GCC! If I were less busy (or lazy) I'd learn assembly...
BTW, I sure could have used this a week ago. I wanted to write a program to let me convert IEEE 754 floating point numbers between ASCII and binary representation. It was basically intended to be a little helper for a Computer Architecture test I took yesterday. I think I did pretty good without it, though. Besides, I don't even know if the 89 uses IEEE 754. Guess I'll go find out. ;)
-Heavy, heavy Kevin
|
|
30 March 2000, 05:15 GMT
|
|
|
|
|
|
|
|
Re: TI-GCC Library R1.5
|
Kevin Goodsell
|
Yeah, I've dived (doven? Uhhh...) into the docs directory now and read a bit about that.
Now, please keep in mind that I don't know much about what I'm talking about here, but if the calcs just uses foating point emulation, would it be possible to implement IEEE floats & doubles? With conversions to and from this other format? It would be more convienient, but I'm not sure if there would really be any other benefits.
I have no idea how gcc deals with floating point in the m68k, but it seems likely that there are 2 possibilities. 1) Emulation, in which case what I suggest should be feasible. 2) Math coprocessor, in which case what I suggest would be near impossible.
Man, I'm really tired and not thinking clearly right now, so forgive me if none of this makes sense.
Come to think of it, when I attempted to compile a program using foats and doubles the only error I got was in the linker - it was missing a function. I tracked down what that function was for and it turned out to be a float->double conversion. Seems that the program might have worked with that function (which would be fairly simple to write). But like I said, I don't know much about this.
Okay, end of rant.
-Kevin
|
|
30 March 2000, 09:57 GMT
|
|
|
|
|
|
|
|
|
|
|
Re: Re: TI-GCC Library R1.5
|
Zeljko Juric
(Web Page)
|
Huh. I spend more than one month in thinking what is the best. And finnaly, I decided that what I do is the best what it can be done at the moment. If you want to use IEEE floats, you really need to write ALL math functions, starting from add, sub, etc. up to sin, log etc. And note that TIOS sprintf is not happy with IEEE floats. It IS possible to implement IEEE float only by rewriting more than 15K of TIOS to work with IEEE floats, and I really don't want to do this. Better idea will be to MODIFY the GCC compiler to generate BCD floats on "float" and "double" instead of IEEE floats.
You say that calc use fp emulation. Yes it is true, but not in IEEE format. Forget IEEE. TIOS does not know anything about IEEE.
Problem with linker is not so easy as you told about.
You probably tried an example where anything needed is float->double conversion, like if you wrote
float a=2.57;
printf_xy(0,50,str,"%f",a);
But, try the following:
float a,b,c,d,e,f:
a=b+c-d*e/f;
Now the linker will report absence of: addition, substraction, multiplication and division. Nothing can be done with IEEE floats, because TIOS can't do nothing with then. You can say: OK, write this functions: add, sub, etc. But, what about sqr, sin,
asinh, frexp, and much more???
That's why I suggested using ti_float instead of float.
I hope that I am clear enough.
|
|
30 March 2000, 18:42 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: TI-GCC Library R1.5
|
Zeljko Juric
(Web Page)
|
I forgot to mention yet another reason against IEEE: advanced algebra software routines included in TIOS. All of them expect floats in SMAP II BCD standard. Suppose that you want to calculate
Integrate (x+1.5, x)
At the moment, it is possible with TIGCC. TIOS works with RPN expressions. Rewrite this in RPN as
x x 1.5 + Integrate
So, everything you need to do to calculate such expressions is to push two bytes using push_quantum_pair on estack, to push float number 1.5 using push_Float, to push two bytes again, and finally to call NG_rationalESI to evaluate this. But, float number 1.5 is expected to be SMAP II BCD float number. If I used IEEE floats, in addition to the fact that all float routines must be replaced, you would not be able to use symbolic mathematics at all! So: you CAN NOT use IEEE floats efficiently on the machine where everything in the operating system is programmed to accept only SMAP II BCD floats. That's why I tell: you MUST use BCD floats. Using IEEE on TI-89 is similar like trying to pay something in USA dollars in the country which accepts only German marks.
|
|
30 March 2000, 21:10 GMT
|
|
1 2
You can change the number of comments per page in Account Preferences.
|