Hi
You can also take a look at this thread:
http://www.utasker.com/forum/index.php?topic=96.0The libraries you are linking look good - the reg passing is important when using SP6 (are you using SP6 or maybe there is a parameter passing problem?).
I don't now why sprintf() shoudn't work - it simply parses the input string and copies it to the output buffer so is environment and hardware independent.
However I don't know whether all of the CW libraries work correctly. There seems to be a big problem with malloc support (possibly limited to certain library versions) since it fails when certain memory sizes are called - not that it is out of memory but rather it somehow doesn't like all sizes (eg. calling malloc(100); malloc(100); malloc(100); may work fine, but calling malloc(100); malloc(90); malloc(100); may return memory for the two calls for 100 bytes but return 0 for the call in the middle for 90 bytes. Therefore I don't exclude a problem with some other library functions.
I know of some poeple who instead use GNU libraries with CW rather than the supplied ones due to various difficulties. Since I haven't done much work with them myself (apart from verifying the malloc problem, which is indeed very strange which I also confirmed) I don't want to imply that there is an error in the sprintf(), rather I would point out that this is not to be totally excluded.
Regards
Mark