Thus spake TONY NIXON 54964 (Anthony.NIXON@ENG.MONASH.EDU.AU): > What if the current instruction is 'ADDWF PCL', as in a jump table. > > The program counter word would now become > > Hi Byte = Pclath<4:0> Low Byte = PCL + W. > > Does the interupt preserve this as it's return address, or does it > point to the next address as it normally would. The ADDWF to the PC will take 2 cycles, rather than the normal 1, and the interrupt will not be taken until the end of the instruction, by which time the PC (hi and low) has been updated to point to the new location in the jump table. If you are asking "can an interrupt at the wrong time screw things up" the answer is no - providing the interrupt routine properly saves and restores any resources used, there will be no effect on the interrupted code other than the time delay, vicious rumours (and incorrect data sheets) to the contrary notwithstanding. -- Clyde Smith-Stubbs | HI-TECH Software, | Voice: +61 7 3354 2411 clyde@htsoft.com | P.O. Box 103, Alderley, | Fax: +61 7 3354 2422 http://www.htsoft.com | QLD, 4051, AUSTRALIA. | --------------------------------------------------------------------------- Download a FREE beta version of our new ANSI C compiler for the PIC microcontroller! Point your WWW browser at http://www.htsoft.com/