Hello,
I have tried to convert an unsigned long int to ascii using the function
char *  ultoa (unsigned long int __val, char *__s, int __radix) of
stdlib.h.
This function converts only the lower two bytes of the unsigned long,
like it were a normal unsigned.

I have tried with this line:
ultoa((unsigned long)100000,dummytext,10);
And the result in dummytext is "34464" (the lower two bytes of 100000)
(checked with Debugger DDD, while the MSP430 is conected via JTAG).
In my opinion it should be "100000".

I work with an MSP430F149 under Debian.

Maybe you can check the command on your system and give me a possible
solution. Is it a bug or have i done something wrong?

Thanks for quick answers,
Frank Schröder

Reply via email to