Tamas Rudnai wrote: > BTW: I would use compare and test macros instead, like CMPWL, CMPFW > and CMPFL, and then macros like SKPEQ, SKPLT, SKPGT, SKPLE, SKPGE. > The reason is that in this way you can have a single comparision and > then multiple conditions saving clock and program memory - especially > that you loose W after these macros. I've found it works best having macros only for the skip that tests the condition bit. For example SKIP_WLE and SKIP_WGT are "skip if W was less than or equal to the other value", and "skip if W was greater than the other value". That way you can use SUBLW and SUBWF to set the condition and it doesn't matter how you got the value into W. It seems that when people are new to the PIC instruction set, they want to run out and make macros for every conceivable case. That may sound like a good idea at first, but you'll find less is more once you get into it a bit. Stick with SKIP_Z, SKIP_NZ, SKIP_WLE, and SKIP_WGT for now. Wait until you get a few projects of experience before creating more macros because by that time you probably don't want them anymore. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist