On Sun, Dec 11, 2011 at 4:43 PM, Dave Harris wrote: > 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? This depends entirely on the compiler. If the behavior is not documented, you'll need to disassemble the startup code. One common behavior is to simply go into an infinite loop upon return from main(). -p. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .