Code:
 define osc 20
Don't know if it's a cut/paste problem or what...
Read the manual and what it specifically says about DEFINE's... And ENDing a program (or STOPping it)

As far as an 'automatic reset', look in the datasheet under WATCHDOG.