You can protect a basic program by saving it with
save"filename",p
You can still run" a protected basic file, but can't load" and list it.
There is a way to unlock these basic files. This only works on a CPC 464 (real machine or emulator).
Type this:
poke &ac02,&90 poke &ac03,&c0 poke &ac01,&c3
then load" the protected basic file. Done.
Now you can list this program.