Hi,
The protection mechanism, will protect everything above a certain limit. This means that the EEPROM should be placed below a certain limit.
As the page size is 512 bytes, this means that for the 9S08QE4, the EEPROM should start at 0xF000 and end at 0xF1FF. The program memory should start at 0xF200 then.
But as the page síze is 512 bytes, and there is no more than 256 RAM bytes available, and that memory should be used for the stack and other variables, the maximum size of the parameters should be set at about 64 bytes. Those 64 bytes are the first in the EEPROM buffer.
As the code must be executed in RAM while erasing/programming the Flash EPROM, there are two ways of doing it.
Either you set aside a static buffer that can hold one entire erase/program routine, or you push it on the stack.
Now, I have not written it myself, so I cannot say that it is possible.
On the 9S08QE8 it can be done anyhow.
Regards,
Ake