> I've been doing a lot of meddling with 16-bit numbers as >part of my battery charger project. I seem to recall that a >number of years ago, I had a copy of a program that took an >expression (along the lines of "x < 5") and generated the >code to perform that comparison. ISTR it also had support >for 8- and 16-bit comparisons. As an addition to the other answers received, have a look at the macros Olin has in his development environment. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist