DSPRelated.com
Forums

DSP56F827: Condensing Strings, two 8bit chars into 16bits

Started by bmbmz123 May 11, 2004
Hello,

I have many strings in my sw. The takes a lot of space.

The strings are defined as:
const char STRING1[] = {"HELLO"};

This puts the 8-bit ASCII codes in lsb of 16bits addresses. The
above string takes 6 words(with EOS=0x00 char).

I want to condense the strings, so that two ASCII chars will be in
one 16bits address.

How is this done?

What happens for a total of odd number of chars in the string? where
is the un-used space??

thanks,
boaz