On Fri, 20 Oct 2000 08:20:59 -0500, you wrote: >I've been avoiding PUTS() because (in CCS at least) it adds a CR/LF tot = he >end of my string. This doesn't work on my serial LCD - prints two chars= of >garbage. > >Maybe I'll have to figure out how to hack the PUTS() routine to delete = this >feature. [Looks up the STDIO.H file....] > >Uh oh.. In CCS C puts() is defined as: > >#define puts(s) {printf(s); putchar(13); putchar(10);} > >This is definitely not more efficient! > >Lawrence Printf is sufficiently general-purpose that for most small embedded apps it is overkill and uses way too much memory for the parts of it you're likely to need, and you'd usually be a lot better off using your own code to provide just the functions you need.=20 e.g. for strings void dispstring(char *sptr) { do dispchar(*sptr++); while (*sptr !=3D 0x00); } numerics and fixed-point decomals are also pretty straightforward and can be coded with a lot less code than printf. Again you can limit the numeric code to just the functionality you need.=20 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics