>BTW, I don't think it matters whether you check the >IE flag before the IF flag or afterwards. Which way >round may have a (very) slight impact on performance, >depending on whether (IE && !IF) or (IF && !IE) is >more common when the PC gets to that location. I guess if you are ANDing the register, so you can test both bits at once, then probably not, but testing each bit individually in assembler using Bit Test instructions, I would automatically put the Enable bit test first for two reasons - 1. If there is any speed requirements where time in the interrupt routine needs to be minimised, then this saves a couple of instruction times when that interrupt is not enabled. 2. It makes the logic of the program flow clearer to anyone following along behind to do maintenance. Sure there is minimal if anything in it, but if there is anything to be gained, even if only clarity, why not. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist