> On Sun, Dec 11, 2011 at 4:43 PM, Dave Harris wrote: > >> Hi All. >> >> I know I should not let it happen, but I'm curious... >> In Hitech C code on a PIC (or others) what happens if main() exits? >> >> > To extend that question, what happens when your assembler program finishe= s > execution? What is the next instruction? > In Microchip C, I think the startup code has main() in a loop. If main exits, it's run again. That's from memory of looking at the startup code, so I may be remembering wrong. Harold --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! Not sent from an iPhone. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .