Hi Quintin and others, I'm more used to CCS than MPLAB. I think speak about "exit(0)" without have tried it, is a waste of time. I first tried it in CCS but it has not that instruction. Then I tried in MPLAB in an old program. In the dissasembly window I obtained this (only the affected instructions not the whole program): 83: exit(0); 092C EB0000 clr.w 0x0000 092E 07FC28 rcall 0x000180 (this is from the main(void) function) 01A4 E2020C cp0.w 0x020c 01A6 3D0004 bra ges, 0x0001b0 01A8 AB420F btst.b 0x020f,#2 01AA 320002 bra z, 0x0001b0 01AC AB020F btst.b 0x020f,#0 01AE 32FFFE bra z, 0x0001ac 01B0 DA4000 ReservedBR 01B2 37FFFE bra 0x0001b0 (I do not see adress 0180 but the simulator brings me here with the last two instructions in an infinite loop) Now, a more used assembler person than me can tell us what is this doing? It does not seem to do a soft reset, unless it previously activates watch-dog and then micro self resets. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist