[A83] Re: CRT (was SDCC port)


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

[A83] Re: CRT (was SDCC port)



Aaron St.John wrote:

>> Libraries are a hassle. Although a nice concept, it's annoying to 
>> have to go find another lib to get some program working. I once did 
>> it and was told to get rid of them.
>
>
> I think the benifits of having a shared CRT outweighs the hassle.  If 
> C programs become common, a lot of space could be wasted by duplicate 
> code.  For example, printf takes up about 500 bytes of code.  If every 
> program included acopy of printf, that's a lot of wasted space, we we 
> don't have much room for on the TI-83.
>
> One thing in our favor here is that the CRT's interface is 
> standardized, so even if there was more than one version of the CRT, 
> you could still expect a program to function correctly.
>
> One idea is to create a dynamically linked library and a statically 
> linked library, and see which one wins out in the end, but that would 
> be a lot of work.

It could also be so that you lose in the end on having libs, just 
because the space is so limited.
You can't fit that many programs in the memory, so not that many share 
the lib. Most programs use only a fraction of the c library functions, 
that mean that you will have a lot of functions in your lib not used by 
any program on the calc, and thus wasting space.
Its not that clear that libraries will save space when storage space is 
very limited...

The best idea for programming C on the calc would probably be to not use 
C libs at all, but as much as possible only use builtin functions and a 
statically linked lib with good optimized functions like sprites and 
tilemaps, output and input.
What is the point of having Ansi C on the calc really? not much more 
then the academic pleasure.
Being able to develop in C might be really handy even without any 
standard C libraries though

--Olle




References: