TI-GCC Library R1.1
Posted by Nick on 8 February 2000, 03:37 GMT
Zeljko Juric has released R1.1 of his TI-GCC Library. This version fixes many AMS 2.03 bugs and grayscale support is now implemented. A lot of other wacky programming stuff is in there, too. For those of you who spend as much of your time as possible living under oversized boulders, TI-GCC is a port of the GNU C Compiler to the 89/92+. The niftiness factors on both TI-GCC and the library are unusually high; check them out as soon as you can.
|
|
|
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.1
|
Roberto
(Web Page)
|
This is awesome. Now I will go and write my first compiled program: Fractal Explorer for the 89 (with grayscale!). Good job Zeljko!
|
|
8 February 2000, 21:52 GMT
|
|
Re: TI-GCC Library R1.1
|
DefconAlpha
|
Wacky? Nifty factor? Nick, man, you been living in the 50's?
|
|
8 February 2000, 23:21 GMT
|
|
Re: TI-GCC Library R1.1
|
yosweetlady
|
What does this lib do?
|
|
9 February 2000, 00:29 GMT
|
|
Performance TI-GCC vs. Assembly
|
Patrick Davidson
(Web Page)
|
To see just how fast TI-GCC code is, I conducted a small test, based on the speed of line-drawing routines. I wrote a C program to draw lines myself, and for the assembly program I call Jimmy Mardell's linelib. The programs would draw a line from the center of the screen to each point on the edges. Each line would be drawn 40 times so that it will be slow enough to time easily. The results:
TI-GCC : 32 seconds, 915 lines per second
Assembly : 30 seconds, 976 lines per second
As you can see, GCC does a pretty good job. In this case it came very close to the assembly program. However, there are some problems with this test:
1) I tested it on VTI, not a real calculator, due to link port problems. I think the relative speeds should be about the same, but it would help if someone could test this for me on a real TI-92 Plus.
2) I don't think the two programs used exactly the same algorithm. In particular, I think LineLib is somewhat more precise (as you can observe from a few dots wrong on the display) which gives it a disadvantage; therefore GCC might look somewhat better than it really is here. I may write my own assembly line routine that works exactly the same as the C one for a more precise comparison later.
3) This isn't completely representative of all code you could write, of course.
4) It doesn't compare size, which I don't think I could do fairly on such a small example anyway.
Despite the drawbacks to this test, I think it still is enough to show that TI-GCC shouldn't be ignored. I actually like programming in assembly myself, but this is certainly useful for people who don't. You can download the sources and executable to the test programs from my web page at:
http://pad.calc.org/st.zip
When compiling it, be sure to use the -O2 switch for full optimization. Also, specifiying -S will generate assembly source that you can analyze to see what the compiler does (although not in exactly the same format as A68K uses).
|
|
9 February 2000, 07:37 GMT
|
|
Re: TI-GCC Library R1.1
|
Zeljko Juric
(Web Page)
|
THE_BUTCHER points to me at one bug which I made in gray.h in tigcclib: SetPlane function does'n work in DoorsOS mode. Namely, one trick which I used to save 4 bytes in generated code make a colision with Doors mode. But, the bugfix is straightforward. For all users of tigcclib: edit gray.h, find definition of SetPlane, and replace followint part of the definition
((x)?__gp1:__gp0,0xEF007F))
with
((x)?__gp1:__gp0,239,127))
That's all. Thanks, THE_BUTCHER!
|
|
9 February 2000, 17:14 GMT
|
|
Re: TI-GCC Library R1.1
|
Devin Bayer
(Web Page)
|
Does this work on HW2, AMS2.0x?
|
|
9 February 2000, 22:02 GMT
|
|
1 2 3
You can change the number of comments per page in Account Preferences.
|