Vicent Colomar Prats wrote: > 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) All this does is reinforce why you shouldn't be using exit(0) to do anything predictable. If you want to reset the processor, execute a RESET instruction. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist