Forums

assembly routine for num-to-string conversion

Started by joncas04 September 15, 2007
Hello,

i am trying to dump numerical data onto the serial interface and am
being hampered by the slowness of the NumToString routine in C,
because of the divisions and remainder functions.

Would anyone be able to share an assembly routine for converting an
unsigned 16-bit word into 6-character strings ? (the alignment or
padding doesn't matter)

This is for a 56800E dsp (56F8346)

with apologies for my inexperience in assembly on this processor ...

many thanks in advance!
Robert
I am not expert on this field, but what about converting to hexadecimal?
You'll have only 4 chars to transmit, and the conversion routine can be
very simple (4 bits a time, managed with shifts and ANDs, and a lookup
table).

Regards,
Roberto


-----Messaggio originale-----
Da: m... [mailto:m...] Per
conto di joncas04
Inviato: venerd14 settembre 2007 16.12
A: m...
Oggetto: [motoroladsp] assembly routine for num-to-string conversion

Hello,

i am trying to dump numerical data onto the serial interface and am
being hampered by the slowness of the NumToString routine in C,
because of the divisions and remainder functions.

Would anyone be able to share an assembly routine for converting an
unsigned 16-bit word into 6-character strings ? (the alignment or
padding doesn't matter)

This is for a 56800E dsp (56F8346)

with apologies for my inexperience in assembly on this processor ...

many thanks in advance!
Robert