when progrmming your mcu,the programmer software will display an option that you can select to protect your code ,this sets the "code protect" configuration bit in the mcu.or you can call the configuration bit pattern in the assembly language program using the CONFIG assembler directive.check:
**broken link removed**
U need find the method pretect the code, Soft protect? or hard protect?
If soft protect, you may try to strobe the signal when you are writing the MCU,
If hard protect, it is impossible to cr@ck it easily.
there is a configuration bit that can be accessed either via software or in the programmer program ( it is easier method ) . . just select the check box named 'code protect' ... this will cause what you want ..
regards