Hi,

First ... restoring ( when genuine value is lost) an Osccal value is not so simple.
The simplest way is to use the Pickit2 ( from µChip ) that has this feature already automated ( see the price, and talk after ... LoL )


Now Reset ... I suppose it is to write the genuine value to its location ...

0x3430 means RETLW 30 ( value is $30 )

DEFINE OSCCAL is just to tell the Pic to read the Osccal value ( does not write anything )

so, you could use

************************************************** ***************************
END
'************************************************* ****************************

@ ORG 3FFh
@ RETLW 30h

at the end of your program.

Note the two last lines must be placed AFTER the END !!!

Alain