It is still good to know what happens if you do exit. I am sure I am not the only person to move a function into main whilst testing and forgot to remove the return statement. On 15 December 2011 01:06, Forrest Christian wrote: > I guess I could, but personally my main() function never exits. After > all my program structure always looks like: > > //init code here > > while (1) > { > // main loop > } > > -forrest > > On 12/14/2011 2:31 AM, alan.b.pearce@stfc.ac.uk wrote: > >> So the answer is for CCS, it calls SLEEP, with nothing after it.... > >> Which seems kinda dangerous to me since there is a chance that it coul= d > >> wake from SLEEP. This has been verified with a PIC18 and a PIC16 > target. > >> > >> Personally I'd much rather see a BRA 0x000F after that SLEEP call.... > > Well, I guess you could always modify the start-up code to do so ... > > > > > > > > -- > 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 .