Hi. I'v spent the last couple of days with a bug (caused by myself !) that I thought was enough "silly" to be told about in public :-) I have an application with a 12F629, that has been working (still under development) quite OK for some time. But then, a few days ago, hell broke lose. All kind of problems. Adding a few NOP's in an unrelated part of the code, could get other parts either begin to run as it should, or just quit working at all. Occasional resets and so on. I finaly found it, a kind of "optimization" I shouldn't have done. In this piece of code : ;****************************************** ... ... movwf ir_status goto end_of_ir_bit_handle .irbh_end code end_of_ir_bit_handle dbankif gbankadr btfss flag_one_bit_received ... ... ;****************************************** I decided that the GOTO wasn't needed since it just jumped to the next instruction anyway. So I commented it out. Now, this is relocatable code, and since the GOTO and the label are in two different code modules, they can end up in totaly different places by the linker. The code just run right into whatever was placed efter the commented GOTO. And different code from build to build, so the whole application was realy unpredictable ! I'v been staring into the oscope like mad, trying to find out what the h--l is going on. Now, *sometimes*, depending on the internal magic of the linker, these two modules *could* end up right after each other, and suddenly everything worked ! Well, until I removed the last piece of debugging code :-) Jan-Erik. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.