It is always possible to copy any program by using a dual cassette deck. So, the first step in program security is to make it impossible to access or tamper with your programs. The following program is the closest I have reached to a perfectly safe program.
An Access Code is asked for. If the entered code is incorrect then the program will NEW itself. If the BREAK key (or STOP key during the INPUT prompt) is pressed then the program will stop but it will be impossible for the tamperer to LIST, EDIT, or RUN the program. The computer appears to contain no program in its memory.
Of course, if the hacker knows to reset the address 16509 to 0 then the program will run without, any problems, but I am sure that this simple program could be extended to include many other faulty address values and at least make the program very troublesome to break into.
10 REM THIS IS OUR PROGRAM
20 PRINT "HELLO--GOODBYE"
30 STOP
9900 SAVE "SECURITY"
9910 POKE 16509,73 *
9920 PRINT "ENTER THE ACCESS CODE"
9930 INPUT CODE
9940 IF CODE [illegible] PEEK 16509 THEN NEW
9950 PRINT "ACCESS CODE ACCEPTED"
9960 PAUSE 60
9970 POKE 16509,0
9980 RUN
ENTER YOUR SPECIAL ACCESS CODE IN LINE 9910
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.