Normaly, for any program memory space not "programmed", it's a NOP. So it will run NOP's until it wraps around and restarts at the reset address. Jan-Erik. V G wrote 2011-12-11 22:50: > 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? --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .