Re: A89: TI-GCC help needed


[Prev][Next][Index][Thread]

Re: A89: TI-GCC help needed







>From: Zoltan Kocsi <zoltan@bendor.com.au>
>Reply-To: assembly-89@lists.ticalc.org
>To: assembly-89@lists.ticalc.org
>Subject: A89: TI-GCC help needed
>Date: Wed, 27 Oct 1999 10:00:04 +1000 (EST)
>
>
>
>  > Recently I have taken my hand to trying to program in C for the TI-89.
>  > Currently I'm working on C Drugwars 89, and I was wondering what kind 
>of
>  > features TI-GCC supports.  What are the data types supported? "int" is,
>  > "float" isn't i'm pretty sure. If float isn't, how would I go about 
>storing
>  > large numbers (up to about 400 million or so). Is "double"?
>

You might want to try cmathlib.  It provides some rudimentary support for 
floats.  It suck, but it may do what you need to do.  Ti supports a 10 byte 
BCD floating point.  Tigcc may not support it, but you can get ti to print 
the numbers with sprintf.  You can also do arithmatic with them using ti's 
built in BCD math package.  I don't really understand the package very well 
though.  If anyone knows how to use it please let me know.  I would really 
appreciate it.



>Gcc does support IEEE floats, doubles and long doubles. It is your
>calculator which does not. However, if you can get hold of either a
>68881 emulation library or write your own IEEE compatible float
>library, then you will have floats. There's a C source for a
>float-only library which comes with the standard gcc distribution,
>if you are desperate.
>
>400 million actually easily fits in a 32-bit entity, gcc on a 68k
>has it:
>

  Here is a silly question.  Gcc has to support compilation to a 68k without 
a coprossor right?  Why can't one just use the right switch to generate code 
for a 68k w/o a coporssor.  Then you could get to use floats in their full 
glory.  Right?  I mean c compillers have been around since before 
coprocessors were commonplace.  Why do we now need hardware support to use 
floats.  I mean, why can't tigcc store and use floats in its own internal 
format.  It would be incompatible with ti's sprintf, but that's not a big 
problem, as long as tigcc can add them together and compare them.  Right?

     Bewildered,  Harry

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Follow-Ups: