David Duffy (AVD) wrote: > I have the need to load a 3 byte counter, then decrement in an > interrupt, detecting (set a flag) when the counter reaches 0x000000. It never occurred to you that we need to know which PIC you're on? > While I can find multi-byte decrement routines in the 'net, none that > I've found allow for the flag setting upon reaching zero. If speed is really important, arrange for the counter to hold the count minus 1. Then you check for carry out after the decrement. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .