Re: ERASING PIC12c508a
For the future, when you are developping your code, do not fill the first few locations. Use a goto instruction in the first locations instead. Do not set the code protection bit.
If later it becomes necessary to change the code, then comment out the first goto, replace it with a nop and then add a goto that points to the new code. Leave the old code alone.
This way you can re-program the part, since th nop will overwrite the goto (nop code is all zeroes, which overrides any ones another instruction code may have).
Once you are done developping the code, either protect the part or program a new one with just the correct code and protect it.
I have used this approach and re-used a parts about 10 times. Of course, all the versions of the code must fit in the program memory space and you need to leave enough empty locations at the beginning to add goto instructions.