(Semi-) Protect a Disk......................John A. Love, III
                                          Washington Apple Pi


In the September 1985 issue of AAL Bob S-C developed a program to create a combination DOS 3.3 and ProDOS Data disk.  My first program listing is in response to his invitation to readers for the development of a front-end wherein the user can select the following:

     1. Slot #.
     2. Drive #.
     3. DOS 3.3 low Track #.
     4. ProDOS Volume Name.

Notice that I did NOT include the DOS 3.3 Volume number which default value provided by DOS 3.3 is 254.  Since I do not own a Hard Disk, I saw no need for changing it.

Several items pertaining to my front-end should be noticed.  First, the error trapping; for example, the Slot number must be between 1 & 7 and the ProDOS Volume Name not only must begin with a letter but also must NOT exceed 15 characters in length.  Second, since each input is either one Byte or a string of single Bytes, there were a few instances in which I had to change Bob's code.  For example, such expressions as "LDA  #SLOT*16" and "CPY  #4*DOS.LOW.TRACK" were out of the question.  As you compare his listing with mine, you will notice the changes that I had to incorporate in order to accomodate user input.

Well, enough of un-finished business.  The other evening I was asked how to protect a Disk from un-warranted intrusion.  Initially, I knew nothing about Disk protection except to state the obvious; namely, that given enough time and talent ANY protection scheme can be broken.  As the very old adage stipulates -- "Locks are meant only to keep honest people out".  With this "awesome" knowledge in mind and Bob's program at my elbow, I decided to apply his program's logic to simply slow the folks down a bit.

My second program does NOT inhibit COPYA in the slightest.  But, that's okay because the caller, a teacher at one of the local colleges, didn't mind.  You see, his Disk contained quizzes along with the answers.  Get the drift....  So, I decided to:
!lm+4
!pp-4

1.  Defeat the CATALOG Command on the DOS stored on the Disk.  If the Disk was cold-booted, the user would not know the names of the files to LOAD & LIST.

2.  Place the CATALOG info on a Track other than #17 (I chose #18 since DOS searches uphill from 17 before going downhill -- in short, keep the time element at a minimum).  In this manner, if the inquisative user attempts to CATALOG the quiz Disk with his own System Master, he will get a blank screen.  Part of my code to follow will ensure not only a blank screen, but also a full disk indication because I place 00's throughout Track 17, Sector 0.
!lm+4
!pp0

Admittedly, such a scheme is very UN-sophisticated.  However, all I wished to do was to slow the inquisative folks down a bit.

With respect to my adaptation of Bob's program, notice that the only parameter I chose for user input was the Drive number.  Others, such as the Slot #, the Volume # and the "real" CATALOG Track # I inserted directly into the code.  Using my logic pertaining to inputting the Drive #, these other parameters can easily be input as well.  Also, notice that I have included remarks at the end of the Source Code on how to use "DISK.SAFE" .
