At 11:57 AM 17/02/1997 -0400, you wrote: >At 05:50 PM 17/2/97 -0600, you wrote: >> What about just a GOTO to address 00 ? This will restart the code as if >>a power-on reset occurred. In your initilization routine, you will have >>to set all the flags and options to known states. But, I do not see why >>it would not work. Have I overlooked something? >> >> ---- Steve > >GOTO 00 is not same as (COLD)reset. It depends on application program >what happends by GOTO 00, if the program expect to be running after >reset, ie expect some re-gisters have "reset" value, then GOTO 00 >might just hang your program. > >antti Personally I have never considered it wise to rely on what state the hardware might be in after a cold start. I believe robust programming means initializing every thing to the state you want it right after power up and before you use those peripherals. So having said that I would jump t a routine that would a) disable all interrupts if your flavour of the PIC has them and b) GOTO zero. If that hangs your program you probably deserve it. John Pioneers are the ones, face down in the mud, with arrows in their backs. Automation Artisans Inc. Ph. 1-250-544-4950 PO Box 20002 Fax 1-250-544-4954 Sidney, BC CANADA V8L 5C9