A89: 68k string manipulation


[Prev][Next][Index][Thread]

A89: 68k string manipulation




Hi,
I'm fairly new to 68k asm, and was wondering if there is a "standard"
programming technique for manipulating individual bytes in a character
string. More specifically, I want to be able to write pairs of characters
to memory, separated by single spaces, and then call that ROM puts()-esque
function to display the resulting string. Since every second pair of
characters does not lie on an even word boundary, the most feasible 
approach seems to be to unroll my character-pair writing loop once and
deal with aligned and non-aligned cases in the one iteration.
This not only "feels" awkward, but seems like a downright kludge. So my
question:
-Is this the standard way to handle odd numbers of bytes in strings?
-If not, what is?
-Am I missing something obvious?

Thanks,

-Jeremy Wazny



References: