[A83] Re: CRT (was SDCC port)
[Prev][Next][Index][Thread]
[A83] Re: CRT (was SDCC port)
>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.
I have considered this. I think the solution is to choose only a very
commonly used subset of the CRT to share. For example, most every program
will use printf(), so that should go into a shared library. On the other
hand, strtok() would very rarely be needed, so it makes more sense to
statically link it (under the belief that on the average calculator, *no*
programs will requiie strtok()).
>What is the point of having Ansi C on the calc really? not much more then
>the academic pleasure.
That's not enough for you? :)
As for people worried about compatibility, I don't see this as a problem.
One huge advantage of the CRT is it is highly standardized. The likelihood
that I'll change the interface of printf() from one library to the next is
exactly 0, since I will be following the ANSI standard. By using a jump
table in the shared library, I can assure that even if the library is
upgraded, programs will still work (and vice versa, programs should still
run no matter how old the library). The only times I envision there being
an update to the shared library would be if a more optimized version of some
of the routines were written. In that case it would be a good idea to
upgrade the library, but certainly not nexesarry.
Stupid like a fox!
Look ma, I'm an artist: http://aaronstj.deviantart.com
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
Follow-Ups: