Check out the crt source code. In the compiler library I have here the code= after main resets the processor. =20 On 2011-12-11, at 1:43 PM, Dave Harris wrote: > Hi All. >=20 > 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? >=20 > Dave > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .