So is there a good tutorial on how to write code in XC8 or XC16? I have a copy of MicroC some where but really haven' looked at it lately. I also have an introductory C book from MikroElktronkia and it is helpful to some extent. Any suggestions would be greatly appreciated. Thank You Michael On Sun, Aug 28, 2016 at 4:45 PM, Bob Ammerman wrote= : > > For example you might find that a C compiler generates better code if t= he > > control variable of a for loop decrements down to 0, or if the control > variable is > > not used inside the for loop at all. You might also find that indexing = an > array is > > much slower that auto incrementing a pointer. > > > > Regards > > Sergio Masci > > Yes, I've certainly done that kind of thing, especially with code for > smaller chips (where I usually code in assembly). It can really make a > difference. But in this case, I did nothing to write 'optimal' C, just a > straightforward implementation of the algorithm. I was very impressed wit= h > the compiler. > > -- Bob Ammerman > RAm Systems. > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .