> Are you absolutely certain of that? Does HiTech put a "goto" at the > end brace? I would be very surprised and disturbed if they did. What would you say is the correct thing to do in this situation ? > Remember, that if execution DOES go into "never never" land, and all > of that place is uninitialized, the PIC will simply see 3ff as the op > code. Since that is an invalid op code it will treat it as a NOP and > increment the PC. Eventually the PC will wrap and hit address 0, which > of course is the first instruction of your program, which will "rerun" > your program, giving the ILLUSION that the program "restarted". ILLUSION ? Is that a newly defined C keyword ? You have assumed that the locater has put main() at the highest address in memory. What happens (according to you scheme) if main() is located immediately before detonate() ? You have also assumed PIC architecture, operation based on an undefined opcode and that the instruction returned from all addressable memory between the top of rom and PC rollover be executed as a NOP. My personal preference would be a jmp $ after the closing brace, but I think I'd take Hi-Tech's approach over a mixture of undefined assumptions producing an illusion. Steve. _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist