Hi Dick,

As far as the linefeed goes I'd say it depends....
If this is something for your own use then by all means, whatever works. But if you're shipping it out for others to use my advise is to make it as robust as you can (and there's probably more that can be done on that front).

For example, the serial terminal in MicroCode Studio can be set up to end each line with CR, CR+LF, LF+CR, NULL or nothing at all.
So if it, or any other terminal program, happens to be set to LF+CR instead of just CR or CR+LF then you would need to check for it.

I couldn't make it work properly without also looking for LF. I only tried with the serial terminal in MCSP though.

/Henrik.