Hi,
If you want to program the Flash EPROM of an 9RS08 while the code is running, there are two major obstacles to overcome:
1) As the program that programs the Flash EPROM cannot execute in the same area as the Flash EPROM, the code must be moved out to the RAM and executed there.
2) The 9RS08 does not have a built in high voltage generator that is used when erasing/programming the Flash EPROMs. So the 12 V Vpp must be generated outside the MCU and connected to the /RESET pin.
So I would rather use, eg the 9S08QD device instead of a 9RS08.
Regards,
Ake