Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_20.ADF » P/Safe1

P/Safe1

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_20.ADF
Filename: P/Safe1
Read OK:
File size: 13FA bytes
Load address: 3A204556
Exec address: 2E462E31
File contents
                        SAFE Protection Update 
                        ~~~~ ~~~~~~~~~~ ~~~~~~

In EUG19, the version of the SAFE utility for ADFS users was published,
version 2.00.  Here I am about to discuss the problems I have had with it,
introduce a routine to disable it, and (most importantly) present a new
version for DFS users.  Also I would like to credit the idea to 'Gus
Donnachaidh, who suggested the program in the editorial for EUG18.  I
forgot to do that in my original write-up.

Firstly, if you use certain programs from the ADT ROM (or maybe some other
ROMs), then when the SAFE routine is next accessed, your Electron will
most likely hang up.  The reason for  this is that some of ADT's utilities
use Page 9 which is the same page that the SAFE routine uses.  The SAFE
routine makes the computer execute the code in this page when any star
command is issued or disk access is to be carried out.  If the code has
been corrupted by ANY program, the computer will probably crash.  To avoid
this the choices are firstly not to use any culprit program whilst the
SAFE application is installed, or, secondly, to relocate the SAFE code to
some other memory address.  To do the latter, you will have to change line
170 in the source code to P%=&(start address), RUN the program to assemble
the assembly language then save the resulting code on any disk to
overwrite the original (other than your EUG19 disk).  The source code was
on EUG19, saved under the filename "$.P.safsc". Incidentally, version 2.00
is 342 decimal bytes in length.  The exact command you should use to save
the original version is:

     *SAVE SAFE (start address) +152

The second problem with this version was the fact that if the *SAFE
command was executed twice, then on the next star command an endless
recursive loop would start, and the computer would therefore hang-up.  To
stop this, only four extra bytes have to be entered into the source code.  
Simply follow the procedure given above to update your version, but when
saving, substitute the '+152' with '+156'.  The new bytes will check to
see if the relevent vector is already pointing to an copy of the routine
in memory, and if so quit.  The introductory message, in this case, will
not be given.

     224 CMP #newv DIV 256
     226 BEQ end

Please note this only works on the ADFS version, and not on the DFS
version I am about to unveil.  Although it doesn't cause an error in
itself (it is in fact icluded in the DFS version) it doesn't work
properly.  I don't know why this is, but if you do execute the *SAFE (DFS)
routine twice, then when you answer YES to the question of whether you
wish to overwrite the file, it will just prompt you again.  

There do seem to be some other bugs in this program.  I don't know exactly
when they occur, and therefore can't do much about them.  Maybe someone
out there can help...

On this disk also is the source code for a utility to disable the SAFE
program.  To operate it, load the BASIC file 'DisableSrc' from this
directory, switch to the directory you wish to have it saved (on a
seperate disk), and then RUN the program.  It will automatically assemble
the code and *SAVE it under the filename 'Disable'.  When in the future
you wish to disable the SAFE utility without pressing Break, simply switch
to this directory and type *Disable.  It will reset the two machine
vectors used, and allows you to use Page 9 for other purposes.

As promised earlier on, here is another version of this utility: 'SAFE
Protection for DFS v1.00'.  Although this is intended for the original
Disc Filing System, it can also be used on the Advanced DFS.  It operates
slightly differently to the ADFS specific version.  The theory behind it
is that if, when a file is opened with the OPENIN or OPENUP commands, the
channel number returned is zero, then the file is non-existent.  In this
case the file hasn't actually been opened (and therefore the program
doesn't close it) but an error will only occur if access is attempted. 
So, the program will attempt to OPENIN the file you are trying to save,
and if the channel number returned is anything other than zero, then it
will inform you that the file exists, and prompt you whether to overwrite
it.  Because of this different operation, there are a couple of points to
note about it.  Firstly, because the file is OPENINed, the program has to
access the disk to find if the file exists.  On the ADFS version, this is
not necessary, because it searches through the RAM (which is the faster
alternative).  This is, I think, the major advantage with the ADFS
version.  Secondly, the  methods which can be used to bypass the newer
routine are different.  Or, should I say, non-existent as far as I am
aware.  It seems that whenever the routine is operational, it will either
work 100% prompting about all files that are about to be overwritten, or
the micro will hang-up.

Ross Little
April 1995
00000000  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000010  20 20 20 20 20 20 20 20  53 41 46 45 20 50 72 6f  |        SAFE Pro|
00000020  74 65 63 74 69 6f 6e 20  55 70 64 61 74 65 20 0d  |tection Update .|
00000030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000040  20 20 20 20 20 20 20 20  7e 7e 7e 7e 20 7e 7e 7e  |        ~~~~ ~~~|
00000050  7e 7e 7e 7e 7e 7e 7e 20  7e 7e 7e 7e 7e 7e 0d 0d  |~~~~~~~ ~~~~~~..|
00000060  49 6e 20 45 55 47 31 39  2c 20 74 68 65 20 76 65  |In EUG19, the ve|
00000070  72 73 69 6f 6e 20 6f 66  1a 20 74 68 65 1a 20 53  |rsion of. the. S|
00000080  41 46 45 1a 20 75 74 69  6c 69 74 79 20 66 6f 72  |AFE. utility for|
00000090  20 41 44 46 53 20 75 73  65 72 73 20 77 61 73 20  | ADFS users was |
000000a0  70 75 62 6c 69 73 68 65  64 2c 0d 76 65 72 73 69  |published,.versi|
000000b0  6f 6e 20 32 2e 30 30 2e  20 20 48 65 72 65 20 49  |on 2.00.  Here I|
000000c0  20 61 6d 20 61 62 6f 75  74 20 74 6f 20 64 69 73  | am about to dis|
000000d0  63 75 73 73 20 74 68 65  20 70 72 6f 62 6c 65 6d  |cuss the problem|
000000e0  73 20 49 20 68 61 76 65  20 68 61 64 20 77 69 74  |s I have had wit|
000000f0  68 20 69 74 2c 0d 69 6e  74 72 6f 64 75 63 65 20  |h it,.introduce |
00000100  61 20 72 6f 75 74 69 6e  65 20 74 6f 20 64 69 73  |a routine to dis|
00000110  61 62 6c 65 20 69 74 2c  20 61 6e 64 20 28 6d 6f  |able it, and (mo|
00000120  73 74 1a 20 69 6d 70 6f  72 74 61 6e 74 6c 79 29  |st. importantly)|
00000130  1a 20 70 72 65 73 65 6e  74 1a 20 61 20 6e 65 77  |. present. a new|
00000140  0d 76 65 72 73 69 6f 6e  1a 20 66 6f 72 1a 20 44  |.version. for. D|
00000150  46 53 1a 20 75 73 65 72  73 2e 20 20 41 6c 73 6f  |FS. users.  Also|
00000160  20 49 20 77 6f 75 6c 64  20 6c 69 6b 65 20 74 6f  | I would like to|
00000170  20 63 72 65 64 69 74 20  74 68 65 1a 20 69 64 65  | credit the. ide|
00000180  61 1a 20 74 6f 1a 20 27  47 75 73 0d 44 6f 6e 6e  |a. to. 'Gus.Donn|
00000190  61 63 68 61 69 64 68 2c  20 77 68 6f 20 73 75 67  |achaidh, who sug|
000001a0  67 65 73 74 65 64 20 74  68 65 1a 20 70 72 6f 67  |gested the. prog|
000001b0  72 61 6d 1a 20 69 6e 1a  20 74 68 65 1a 20 65 64  |ram. in. the. ed|
000001c0  69 74 6f 72 69 61 6c 1a  20 66 6f 72 20 45 55 47  |itorial. for EUG|
000001d0  31 38 2e 20 20 49 0d 66  6f 72 67 6f 74 20 74 6f  |18.  I.forgot to|
000001e0  20 64 6f 20 74 68 61 74  20 69 6e 20 6d 79 20 6f  | do that in my o|
000001f0  72 69 67 69 6e 61 6c 20  77 72 69 74 65 2d 75 70  |riginal write-up|
00000200  2e 0d 0d 46 69 72 73 74  6c 79 2c 20 69 66 20 79  |...Firstly, if y|
00000210  6f 75 20 75 73 65 20 63  65 72 74 61 69 6e 20 70  |ou use certain p|
00000220  72 6f 67 72 61 6d 73 20  66 72 6f 6d 20 74 68 65  |rograms from the|
00000230  20 41 44 54 20 52 4f 4d  20 28 6f 72 20 6d 61 79  | ADT ROM (or may|
00000240  62 65 20 73 6f 6d 65 20  6f 74 68 65 72 0d 52 4f  |be some other.RO|
00000250  4d 73 29 2c 20 74 68 65  6e 20 77 68 65 6e 20 74  |Ms), then when t|
00000260  68 65 20 53 41 46 45 1a  20 72 6f 75 74 69 6e 65  |he SAFE. routine|
00000270  1a 20 69 73 1a 20 6e 65  78 74 1a 20 61 63 63 65  |. is. next. acce|
00000280  73 73 65 64 2c 20 79 6f  75 72 20 45 6c 65 63 74  |ssed, your Elect|
00000290  72 6f 6e 20 77 69 6c 6c  0d 6d 6f 73 74 20 6c 69  |ron will.most li|
000002a0  6b 65 6c 79 20 68 61 6e  67 20 75 70 2e 20 20 54  |kely hang up.  T|
000002b0  68 65 20 72 65 61 73 6f  6e 20 66 6f 72 20 20 74  |he reason for  t|
000002c0  68 69 73 20 69 73 20 74  68 61 74 20 73 6f 6d 65  |his is that some|
000002d0  20 6f 66 20 41 44 54 27  73 20 75 74 69 6c 69 74  | of ADT's utilit|
000002e0  69 65 73 0d 75 73 65 20  50 61 67 65 20 39 20 77  |ies.use Page 9 w|
000002f0  68 69 63 68 20 69 73 20  74 68 65 20 73 61 6d 65  |hich is the same|
00000300  20 70 61 67 65 20 74 68  61 74 1a 20 74 68 65 1a  | page that. the.|
00000310  20 53 41 46 45 1a 20 72  6f 75 74 69 6e 65 20 75  | SAFE. routine u|
00000320  73 65 73 2e 20 20 54 68  65 20 53 41 46 45 0d 72  |ses.  The SAFE.r|
00000330  6f 75 74 69 6e 65 1a 20  6d 61 6b 65 73 1a 20 74  |outine. makes. t|
00000340  68 65 1a 20 63 6f 6d 70  75 74 65 72 1a 20 65 78  |he. computer. ex|
00000350  65 63 75 74 65 20 74 68  65 20 63 6f 64 65 20 69  |ecute the code i|
00000360  6e 20 74 68 69 73 20 70  61 67 65 20 77 68 65 6e  |n this page when|
00000370  20 61 6e 79 20 73 74 61  72 0d 63 6f 6d 6d 61 6e  | any star.comman|
00000380  64 20 69 73 20 69 73 73  75 65 64 20 6f 72 20 64  |d is issued or d|
00000390  69 73 6b 1a 20 61 63 63  65 73 73 1a 20 69 73 1a  |isk. access. is.|
000003a0  20 74 6f 20 62 65 20 63  61 72 72 69 65 64 20 6f  | to be carried o|
000003b0  75 74 2e 20 20 49 66 20  74 68 65 20 63 6f 64 65  |ut.  If the code|
000003c0  20 68 61 73 0d 62 65 65  6e 20 63 6f 72 72 75 70  | has.been corrup|
000003d0  74 65 64 20 62 79 20 41  4e 59 20 70 72 6f 67 72  |ted by ANY progr|
000003e0  61 6d 2c 20 74 68 65 20  63 6f 6d 70 75 74 65 72  |am, the computer|
000003f0  20 77 69 6c 6c 20 70 72  6f 62 61 62 6c 79 20 63  | will probably c|
00000400  72 61 73 68 2e 20 20 54  6f 20 61 76 6f 69 64 0d  |rash.  To avoid.|
00000410  74 68 69 73 20 74 68 65  20 63 68 6f 69 63 65 73  |this the choices|
00000420  20 61 72 65 20 66 69 72  73 74 6c 79 20 6e 6f 74  | are firstly not|
00000430  20 74 6f 20 75 73 65 1a  20 61 6e 79 1a 20 63 75  | to use. any. cu|
00000440  6c 70 72 69 74 1a 20 70  72 6f 67 72 61 6d 1a 20  |lprit. program. |
00000450  77 68 69 6c 73 74 20 74  68 65 0d 53 41 46 45 1a  |whilst the.SAFE.|
00000460  20 61 70 70 6c 69 63 61  74 69 6f 6e 20 69 73 20  | application is |
00000470  69 6e 73 74 61 6c 6c 65  64 2c 20 6f 72 2c 20 73  |installed, or, s|
00000480  65 63 6f 6e 64 6c 79 2c  20 74 6f 20 72 65 6c 6f  |econdly, to relo|
00000490  63 61 74 65 20 74 68 65  20 53 41 46 45 20 63 6f  |cate the SAFE co|
000004a0  64 65 20 74 6f 0d 73 6f  6d 65 20 6f 74 68 65 72  |de to.some other|
000004b0  20 6d 65 6d 6f 72 79 20  61 64 64 72 65 73 73 2e  | memory address.|
000004c0  20 20 54 6f 20 64 6f 20  74 68 65 20 6c 61 74 74  |  To do the latt|
000004d0  65 72 2c 20 79 6f 75 20  77 69 6c 6c 20 68 61 76  |er, you will hav|
000004e0  65 20 74 6f 20 63 68 61  6e 67 65 20 6c 69 6e 65  |e to change line|
000004f0  0d 31 37 30 20 69 6e 20  74 68 65 20 73 6f 75 72  |.170 in the sour|
00000500  63 65 20 63 6f 64 65 20  74 6f 20 50 25 3d 26 28  |ce code to P%=&(|
00000510  73 74 61 72 74 20 61 64  64 72 65 73 73 29 2c 20  |start address), |
00000520  52 55 4e 20 74 68 65 20  70 72 6f 67 72 61 6d 20  |RUN the program |
00000530  74 6f 20 61 73 73 65 6d  62 6c 65 0d 74 68 65 20  |to assemble.the |
00000540  61 73 73 65 6d 62 6c 79  1a 20 6c 61 6e 67 75 61  |assembly. langua|
00000550  67 65 1a 20 74 68 65 6e  1a 20 73 61 76 65 1a 20  |ge. then. save. |
00000560  74 68 65 1a 20 72 65 73  75 6c 74 69 6e 67 1a 20  |the. resulting. |
00000570  63 6f 64 65 1a 20 6f 6e  1a 20 61 6e 79 1a 20 64  |code. on. any. d|
00000580  69 73 6b 20 74 6f 0d 6f  76 65 72 77 72 69 74 65  |isk to.overwrite|
00000590  1a 20 74 68 65 20 6f 72  69 67 69 6e 61 6c 20 28  |. the original (|
000005a0  6f 74 68 65 72 20 74 68  61 6e 20 79 6f 75 72 20  |other than your |
000005b0  45 55 47 31 39 20 64 69  73 6b 29 2e 20 20 54 68  |EUG19 disk).  Th|
000005c0  65 20 73 6f 75 72 63 65  20 63 6f 64 65 20 77 61  |e source code wa|
000005d0  73 0d 6f 6e 20 45 55 47  31 39 2c 20 73 61 76 65  |s.on EUG19, save|
000005e0  64 20 75 6e 64 65 72 20  74 68 65 20 66 69 6c 65  |d under the file|
000005f0  6e 61 6d 65 20 22 24 2e  50 2e 73 61 66 73 63 22  |name "$.P.safsc"|
00000600  2e 20 49 6e 63 69 64 65  6e 74 61 6c 6c 79 2c 20  |. Incidentally, |
00000610  76 65 72 73 69 6f 6e 20  32 2e 30 30 0d 69 73 20  |version 2.00.is |
00000620  33 34 32 1a 20 64 65 63  69 6d 61 6c 20 62 79 74  |342. decimal byt|
00000630  65 73 20 69 6e 20 6c 65  6e 67 74 68 2e 20 20 54  |es in length.  T|
00000640  68 65 20 65 78 61 63 74  20 63 6f 6d 6d 61 6e 64  |he exact command|
00000650  20 79 6f 75 20 73 68 6f  75 6c 64 20 75 73 65 20  | you should use |
00000660  74 6f 20 73 61 76 65 0d  74 68 65 20 6f 72 69 67  |to save.the orig|
00000670  69 6e 61 6c 20 76 65 72  73 69 6f 6e 20 69 73 3a  |inal version is:|
00000680  0d 0d 20 20 20 20 20 2a  53 41 56 45 20 53 41 46  |..     *SAVE SAF|
00000690  45 20 28 73 74 61 72 74  20 61 64 64 72 65 73 73  |E (start address|
000006a0  29 20 2b 31 35 32 0d 0d  54 68 65 20 73 65 63 6f  |) +152..The seco|
000006b0  6e 64 20 70 72 6f 62 6c  65 6d 20 77 69 74 68 20  |nd problem with |
000006c0  74 68 69 73 1a 20 76 65  72 73 69 6f 6e 1a 20 77  |this. version. w|
000006d0  61 73 1a 20 74 68 65 1a  20 66 61 63 74 1a 20 74  |as. the. fact. t|
000006e0  68 61 74 1a 20 69 66 1a  20 74 68 65 20 2a 53 41  |hat. if. the *SA|
000006f0  46 45 0d 63 6f 6d 6d 61  6e 64 1a 20 77 61 73 1a  |FE.command. was.|
00000700  20 65 78 65 63 75 74 65  64 1a 20 74 77 69 63 65  | executed. twice|
00000710  2c 1a 20 74 68 65 6e 1a  20 6f 6e 1a 20 74 68 65  |,. then. on. the|
00000720  20 6e 65 78 74 20 73 74  61 72 20 63 6f 6d 6d 61  | next star comma|
00000730  6e 64 20 61 6e 20 65 6e  64 6c 65 73 73 0d 72 65  |nd an endless.re|
00000740  63 75 72 73 69 76 65 20  6c 6f 6f 70 20 77 6f 75  |cursive loop wou|
00000750  6c 64 20 73 74 61 72 74  2c 20 61 6e 64 20 74 68  |ld start, and th|
00000760  65 20 63 6f 6d 70 75 74  65 72 1a 20 77 6f 75 6c  |e computer. woul|
00000770  64 20 74 68 65 72 65 66  6f 72 65 20 68 61 6e 67  |d therefore hang|
00000780  2d 75 70 2e 20 20 54 6f  0d 73 74 6f 70 20 74 68  |-up.  To.stop th|
00000790  69 73 2c 20 6f 6e 6c 79  20 66 6f 75 72 20 65 78  |is, only four ex|
000007a0  74 72 61 20 62 79 74 65  73 20 68 61 76 65 20 74  |tra bytes have t|
000007b0  6f 1a 20 62 65 20 65 6e  74 65 72 65 64 20 69 6e  |o. be entered in|
000007c0  74 6f 20 74 68 65 20 73  6f 75 72 63 65 20 63 6f  |to the source co|
000007d0  64 65 2e 20 20 0d 53 69  6d 70 6c 79 20 66 6f 6c  |de.  .Simply fol|
000007e0  6c 6f 77 20 74 68 65 20  70 72 6f 63 65 64 75 72  |low the procedur|
000007f0  65 20 67 69 76 65 6e 20  61 62 6f 76 65 20 74 6f  |e given above to|
00000800  20 75 70 64 61 74 65 20  79 6f 75 72 1a 20 76 65  | update your. ve|
00000810  72 73 69 6f 6e 2c 1a 20  62 75 74 20 77 68 65 6e  |rsion,. but when|
00000820  0d 73 61 76 69 6e 67 2c  1a 20 73 75 62 73 74 69  |.saving,. substi|
00000830  74 75 74 65 1a 20 74 68  65 1a 20 27 2b 31 35 32  |tute. the. '+152|
00000840  27 20 77 69 74 68 20 27  2b 31 35 36 27 2e 20 20  |' with '+156'.  |
00000850  54 68 65 20 6e 65 77 20  62 79 74 65 73 20 77 69  |The new bytes wi|
00000860  6c 6c 20 63 68 65 63 6b  20 74 6f 0d 73 65 65 20  |ll check to.see |
00000870  69 66 20 74 68 65 20 72  65 6c 65 76 65 6e 74 1a  |if the relevent.|
00000880  20 76 65 63 74 6f 72 1a  20 69 73 20 61 6c 72 65  | vector. is alre|
00000890  61 64 79 20 70 6f 69 6e  74 69 6e 67 20 74 6f 20  |ady pointing to |
000008a0  61 6e 20 63 6f 70 79 20  6f 66 20 74 68 65 20 72  |an copy of the r|
000008b0  6f 75 74 69 6e 65 0d 69  6e 20 6d 65 6d 6f 72 79  |outine.in memory|
000008c0  2c 20 61 6e 64 20 69 66  20 73 6f 20 71 75 69 74  |, and if so quit|
000008d0  2e 1a 20 20 54 68 65 1a  20 69 6e 74 72 6f 64 75  |..  The. introdu|
000008e0  63 74 6f 72 79 20 6d 65  73 73 61 67 65 2c 20 69  |ctory message, i|
000008f0  6e 20 74 68 69 73 20 63  61 73 65 2c 20 77 69 6c  |n this case, wil|
00000900  6c 0d 6e 6f 74 20 62 65  20 67 69 76 65 6e 2e 0d  |l.not be given..|
00000910  0d 20 20 20 20 20 32 32  34 20 43 4d 50 20 23 6e  |.     224 CMP #n|
00000920  65 77 76 20 44 49 56 20  32 35 36 0d 20 20 20 20  |ewv DIV 256.    |
00000930  20 32 32 36 20 42 45 51  20 65 6e 64 0d 0d 50 6c  | 226 BEQ end..Pl|
00000940  65 61 73 65 20 6e 6f 74  65 20 74 68 69 73 20 6f  |ease note this o|
00000950  6e 6c 79 20 77 6f 72 6b  73 1a 20 6f 6e 1a 20 74  |nly works. on. t|
00000960  68 65 1a 20 41 44 46 53  1a 20 76 65 72 73 69 6f  |he. ADFS. versio|
00000970  6e 2c 1a 20 61 6e 64 1a  20 6e 6f 74 1a 20 6f 6e  |n,. and. not. on|
00000980  20 74 68 65 20 44 46 53  0d 76 65 72 73 69 6f 6e  | the DFS.version|
00000990  1a 20 49 1a 20 61 6d 1a  20 61 62 6f 75 74 1a 20  |. I. am. about. |
000009a0  74 6f 1a 20 75 6e 76 65  69 6c 2e 1a 20 20 41 6c  |to. unveil..  Al|
000009b0  74 68 6f 75 67 68 20 69  74 20 64 6f 65 73 6e 27  |though it doesn'|
000009c0  74 20 63 61 75 73 65 20  61 6e 20 65 72 72 6f 72  |t cause an error|
000009d0  20 69 6e 0d 69 74 73 65  6c 66 1a 20 28 69 74 1a  | in.itself. (it.|
000009e0  20 69 73 1a 20 69 6e 20  66 61 63 74 20 69 63 6c  | is. in fact icl|
000009f0  75 64 65 64 20 69 6e 1a  20 74 68 65 1a 20 44 46  |uded in. the. DF|
00000a00  53 1a 20 76 65 72 73 69  6f 6e 29 1a 20 69 74 1a  |S. version). it.|
00000a10  20 64 6f 65 73 6e 27 74  1a 20 77 6f 72 6b 0d 70  | doesn't. work.p|
00000a20  72 6f 70 65 72 6c 79 2e  20 20 49 20 64 6f 6e 27  |roperly.  I don'|
00000a30  74 20 6b 6e 6f 77 20 77  68 79 20 74 68 69 73 20  |t know why this |
00000a40  69 73 2c 20 62 75 74 20  69 66 20 79 6f 75 20 64  |is, but if you d|
00000a50  6f 20 65 78 65 63 75 74  65 20 74 68 65 20 2a 53  |o execute the *S|
00000a60  41 46 45 20 28 44 46 53  29 0d 72 6f 75 74 69 6e  |AFE (DFS).routin|
00000a70  65 20 74 77 69 63 65 2c  20 74 68 65 6e 20 77 68  |e twice, then wh|
00000a80  65 6e 1a 20 79 6f 75 1a  20 61 6e 73 77 65 72 1a  |en. you. answer.|
00000a90  20 59 45 53 1a 20 74 6f  20 74 68 65 20 71 75 65  | YES. to the que|
00000aa0  73 74 69 6f 6e 20 6f 66  20 77 68 65 74 68 65 72  |stion of whether|
00000ab0  20 79 6f 75 0d 77 69 73  68 20 74 6f 20 6f 76 65  | you.wish to ove|
00000ac0  72 77 72 69 74 65 20 74  68 65 20 66 69 6c 65 2c  |rwrite the file,|
00000ad0  20 69 74 20 77 69 6c 6c  20 6a 75 73 74 20 70 72  | it will just pr|
00000ae0  6f 6d 70 74 20 79 6f 75  20 61 67 61 69 6e 2e 20  |ompt you again. |
00000af0  20 0d 0d 54 68 65 72 65  20 64 6f 20 73 65 65 6d  | ..There do seem|
00000b00  20 74 6f 20 62 65 20 73  6f 6d 65 20 6f 74 68 65  | to be some othe|
00000b10  72 20 62 75 67 73 20 69  6e 20 74 68 69 73 20 70  |r bugs in this p|
00000b20  72 6f 67 72 61 6d 2e 20  20 49 20 64 6f 6e 27 74  |rogram.  I don't|
00000b30  20 6b 6e 6f 77 20 65 78  61 63 74 6c 79 0d 77 68  | know exactly.wh|
00000b40  65 6e 20 74 68 65 79 20  6f 63 63 75 72 2c 20 61  |en they occur, a|
00000b50  6e 64 20 74 68 65 72 65  66 6f 72 65 1a 20 63 61  |nd therefore. ca|
00000b60  6e 27 74 1a 20 64 6f 1a  20 6d 75 63 68 20 61 62  |n't. do. much ab|
00000b70  6f 75 74 20 74 68 65 6d  2e 20 20 4d 61 79 62 65  |out them.  Maybe|
00000b80  20 73 6f 6d 65 6f 6e 65  0d 6f 75 74 20 74 68 65  | someone.out the|
00000b90  72 65 20 63 61 6e 20 68  65 6c 70 2e 2e 2e 0d 0d  |re can help.....|
00000ba0  4f 6e 20 74 68 69 73 20  64 69 73 6b 20 61 6c 73  |On this disk als|
00000bb0  6f 20 69 73 1a 20 74 68  65 1a 20 73 6f 75 72 63  |o is. the. sourc|
00000bc0  65 1a 20 63 6f 64 65 1a  20 66 6f 72 20 61 20 75  |e. code. for a u|
00000bd0  74 69 6c 69 74 79 20 74  6f 20 64 69 73 61 62 6c  |tility to disabl|
00000be0  65 20 74 68 65 20 53 41  46 45 0d 70 72 6f 67 72  |e the SAFE.progr|
00000bf0  61 6d 2e 1a 20 20 54 6f  1a 20 6f 70 65 72 61 74  |am..  To. operat|
00000c00  65 1a 20 69 74 2c 1a 20  6c 6f 61 64 1a 20 74 68  |e. it,. load. th|
00000c10  65 20 42 41 53 49 43 20  66 69 6c 65 20 27 44 69  |e BASIC file 'Di|
00000c20  73 61 62 6c 65 53 72 63  27 1a 20 66 72 6f 6d 1a  |sableSrc'. from.|
00000c30  20 74 68 69 73 0d 64 69  72 65 63 74 6f 72 79 2c  | this.directory,|
00000c40  1a 20 73 77 69 74 63 68  20 74 6f 20 74 68 65 20  |. switch to the |
00000c50  64 69 72 65 63 74 6f 72  79 20 79 6f 75 1a 20 77  |directory you. w|
00000c60  69 73 68 1a 20 74 6f 1a  20 68 61 76 65 1a 20 69  |ish. to. have. i|
00000c70  74 1a 20 73 61 76 65 64  1a 20 28 6f 6e 1a 20 61  |t. saved. (on. a|
00000c80  0d 73 65 70 65 72 61 74  65 20 64 69 73 6b 29 2c  |.seperate disk),|
00000c90  1a 20 61 6e 64 20 74 68  65 6e 20 52 55 4e 20 74  |. and then RUN t|
00000ca0  68 65 20 70 72 6f 67 72  61 6d 2e 20 20 49 74 20  |he program.  It |
00000cb0  77 69 6c 6c 20 61 75 74  6f 6d 61 74 69 63 61 6c  |will automatical|
00000cc0  6c 79 20 61 73 73 65 6d  62 6c 65 0d 74 68 65 20  |ly assemble.the |
00000cd0  63 6f 64 65 20 61 6e 64  1a 20 2a 53 41 56 45 1a  |code and. *SAVE.|
00000ce0  20 69 74 1a 20 75 6e 64  65 72 20 74 68 65 20 66  | it. under the f|
00000cf0  69 6c 65 6e 61 6d 65 20  27 44 69 73 61 62 6c 65  |ilename 'Disable|
00000d00  27 2e 20 20 57 68 65 6e  20 69 6e 20 74 68 65 20  |'.  When in the |
00000d10  66 75 74 75 72 65 0d 79  6f 75 20 77 69 73 68 20  |future.you wish |
00000d20  74 6f 20 64 69 73 61 62  6c 65 20 74 68 65 20 53  |to disable the S|
00000d30  41 46 45 20 75 74 69 6c  69 74 79 20 77 69 74 68  |AFE utility with|
00000d40  6f 75 74 20 70 72 65 73  73 69 6e 67 20 42 72 65  |out pressing Bre|
00000d50  61 6b 2c 20 73 69 6d 70  6c 79 20 73 77 69 74 63  |ak, simply switc|
00000d60  68 0d 74 6f 1a 20 74 68  69 73 20 64 69 72 65 63  |h.to. this direc|
00000d70  74 6f 72 79 20 61 6e 64  20 74 79 70 65 20 2a 44  |tory and type *D|
00000d80  69 73 61 62 6c 65 2e 1a  20 20 49 74 1a 20 77 69  |isable..  It. wi|
00000d90  6c 6c 1a 20 72 65 73 65  74 1a 20 74 68 65 1a 20  |ll. reset. the. |
00000da0  74 77 6f 1a 20 6d 61 63  68 69 6e 65 0d 76 65 63  |two. machine.vec|
00000db0  74 6f 72 73 20 75 73 65  64 2c 20 61 6e 64 20 61  |tors used, and a|
00000dc0  6c 6c 6f 77 73 20 79 6f  75 20 74 6f 20 75 73 65  |llows you to use|
00000dd0  20 50 61 67 65 20 39 20  66 6f 72 20 6f 74 68 65  | Page 9 for othe|
00000de0  72 20 70 75 72 70 6f 73  65 73 2e 0d 0d 41 73 20  |r purposes...As |
00000df0  70 72 6f 6d 69 73 65 64  20 65 61 72 6c 69 65 72  |promised earlier|
00000e00  20 6f 6e 2c 20 68 65 72  65 1a 20 69 73 1a 20 61  | on, here. is. a|
00000e10  6e 6f 74 68 65 72 1a 20  76 65 72 73 69 6f 6e 1a  |nother. version.|
00000e20  20 6f 66 20 74 68 69 73  20 75 74 69 6c 69 74 79  | of this utility|
00000e30  3a 20 27 53 41 46 45 0d  50 72 6f 74 65 63 74 69  |: 'SAFE.Protecti|
00000e40  6f 6e 1a 20 66 6f 72 1a  20 44 46 53 20 76 31 2e  |on. for. DFS v1.|
00000e50  30 30 27 2e 20 20 41 6c  74 68 6f 75 67 68 20 74  |00'.  Although t|
00000e60  68 69 73 20 69 73 20 69  6e 74 65 6e 64 65 64 20  |his is intended |
00000e70  66 6f 72 1a 20 74 68 65  1a 20 6f 72 69 67 69 6e  |for. the. origin|
00000e80  61 6c 0d 44 69 73 63 20  46 69 6c 69 6e 67 20 53  |al.Disc Filing S|
00000e90  79 73 74 65 6d 2c 1a 20  69 74 20 63 61 6e 20 61  |ystem,. it can a|
00000ea0  6c 73 6f 20 62 65 20 75  73 65 64 20 6f 6e 20 74  |lso be used on t|
00000eb0  68 65 20 41 64 76 61 6e  63 65 64 20 44 46 53 2e  |he Advanced DFS.|
00000ec0  20 20 49 74 20 6f 70 65  72 61 74 65 73 0d 73 6c  |  It operates.sl|
00000ed0  69 67 68 74 6c 79 20 64  69 66 66 65 72 65 6e 74  |ightly different|
00000ee0  6c 79 20 74 6f 20 74 68  65 1a 20 41 44 46 53 1a  |ly to the. ADFS.|
00000ef0  20 73 70 65 63 69 66 69  63 20 76 65 72 73 69 6f  | specific versio|
00000f00  6e 2e 20 20 54 68 65 20  74 68 65 6f 72 79 20 62  |n.  The theory b|
00000f10  65 68 69 6e 64 20 69 74  0d 69 73 20 74 68 61 74  |ehind it.is that|
00000f20  20 69 66 2c 20 77 68 65  6e 20 61 20 66 69 6c 65  | if, when a file|
00000f30  1a 20 69 73 20 6f 70 65  6e 65 64 20 77 69 74 68  |. is opened with|
00000f40  20 74 68 65 20 4f 50 45  4e 49 4e 20 6f 72 20 4f  | the OPENIN or O|
00000f50  50 45 4e 55 50 20 63 6f  6d 6d 61 6e 64 73 2c 20  |PENUP commands, |
00000f60  74 68 65 0d 63 68 61 6e  6e 65 6c 20 6e 75 6d 62  |the.channel numb|
00000f70  65 72 20 72 65 74 75 72  6e 65 64 20 69 73 20 7a  |er returned is z|
00000f80  65 72 6f 2c 20 74 68 65  6e 20 74 68 65 1a 20 66  |ero, then the. f|
00000f90  69 6c 65 1a 20 69 73 20  6e 6f 6e 2d 65 78 69 73  |ile. is non-exis|
00000fa0  74 65 6e 74 2e 20 20 49  6e 20 74 68 69 73 0d 63  |tent.  In this.c|
00000fb0  61 73 65 1a 20 74 68 65  1a 20 66 69 6c 65 1a 20  |ase. the. file. |
00000fc0  68 61 73 6e 27 74 1a 20  61 63 74 75 61 6c 6c 79  |hasn't. actually|
00000fd0  20 62 65 65 6e 20 6f 70  65 6e 65 64 20 28 61 6e  | been opened (an|
00000fe0  64 20 74 68 65 72 65 66  6f 72 65 1a 20 74 68 65  |d therefore. the|
00000ff0  1a 20 70 72 6f 67 72 61  6d 0d 64 6f 65 73 6e 27  |. program.doesn'|
00001000  74 20 63 6c 6f 73 65 20  69 74 29 20 62 75 74 20  |t close it) but |
00001010  61 6e 1a 20 65 72 72 6f  72 1a 20 77 69 6c 6c 1a  |an. error. will.|
00001020  20 6f 6e 6c 79 1a 20 6f  63 63 75 72 20 69 66 20  | only. occur if |
00001030  61 63 63 65 73 73 20 69  73 20 61 74 74 65 6d 70  |access is attemp|
00001040  74 65 64 2e 20 0d 53 6f  2c 20 74 68 65 20 70 72  |ted. .So, the pr|
00001050  6f 67 72 61 6d 20 77 69  6c 6c 20 61 74 74 65 6d  |ogram will attem|
00001060  70 74 20 74 6f 20 4f 50  45 4e 49 4e 20 74 68 65  |pt to OPENIN the|
00001070  20 66 69 6c 65 1a 20 79  6f 75 1a 20 61 72 65 1a  | file. you. are.|
00001080  20 74 72 79 69 6e 67 20  74 6f 20 73 61 76 65 2c  | trying to save,|
00001090  0d 61 6e 64 1a 20 69 66  1a 20 74 68 65 1a 20 63  |.and. if. the. c|
000010a0  68 61 6e 6e 65 6c 20 6e  75 6d 62 65 72 20 72 65  |hannel number re|
000010b0  74 75 72 6e 65 64 20 69  73 20 61 6e 79 74 68 69  |turned is anythi|
000010c0  6e 67 20 6f 74 68 65 72  20 74 68 61 6e 20 7a 65  |ng other than ze|
000010d0  72 6f 2c 20 74 68 65 6e  20 69 74 0d 77 69 6c 6c  |ro, then it.will|
000010e0  20 69 6e 66 6f 72 6d 20  79 6f 75 20 74 68 61 74  | inform you that|
000010f0  1a 20 74 68 65 20 66 69  6c 65 20 65 78 69 73 74  |. the file exist|
00001100  73 2c 20 61 6e 64 20 70  72 6f 6d 70 74 20 79 6f  |s, and prompt yo|
00001110  75 20 77 68 65 74 68 65  72 20 74 6f 20 6f 76 65  |u whether to ove|
00001120  72 77 72 69 74 65 0d 69  74 2e 20 20 42 65 63 61  |rwrite.it.  Beca|
00001130  75 73 65 20 6f 66 20 74  68 69 73 20 64 69 66 66  |use of this diff|
00001140  65 72 65 6e 74 1a 20 6f  70 65 72 61 74 69 6f 6e  |erent. operation|
00001150  2c 20 74 68 65 72 65 20  61 72 65 20 61 20 63 6f  |, there are a co|
00001160  75 70 6c 65 20 6f 66 20  70 6f 69 6e 74 73 20 74  |uple of points t|
00001170  6f 0d 6e 6f 74 65 20 61  62 6f 75 74 20 69 74 2e  |o.note about it.|
00001180  20 20 46 69 72 73 74 6c  79 2c 20 62 65 63 61 75  |  Firstly, becau|
00001190  73 65 20 74 68 65 1a 20  66 69 6c 65 20 69 73 20  |se the. file is |
000011a0  4f 50 45 4e 49 4e 65 64  2c 20 74 68 65 20 70 72  |OPENINed, the pr|
000011b0  6f 67 72 61 6d 20 68 61  73 20 74 6f 0d 61 63 63  |ogram has to.acc|
000011c0  65 73 73 20 74 68 65 20  64 69 73 6b 20 74 6f 20  |ess the disk to |
000011d0  66 69 6e 64 20 69 66 20  74 68 65 1a 20 66 69 6c  |find if the. fil|
000011e0  65 20 65 78 69 73 74 73  2e 20 20 4f 6e 20 74 68  |e exists.  On th|
000011f0  65 20 41 44 46 53 20 76  65 72 73 69 6f 6e 2c 20  |e ADFS version, |
00001200  74 68 69 73 20 69 73 0d  6e 6f 74 20 6e 65 63 65  |this is.not nece|
00001210  73 73 61 72 79 2c 20 62  65 63 61 75 73 65 20 69  |ssary, because i|
00001220  74 20 73 65 61 72 63 68  65 73 20 74 68 72 6f 75  |t searches throu|
00001230  67 68 20 74 68 65 20 52  41 4d 1a 20 28 77 68 69  |gh the RAM. (whi|
00001240  63 68 1a 20 69 73 1a 20  74 68 65 20 66 61 73 74  |ch. is. the fast|
00001250  65 72 0d 61 6c 74 65 72  6e 61 74 69 76 65 29 2e  |er.alternative).|
00001260  1a 20 20 54 68 69 73 1a  20 69 73 2c 1a 20 49 1a  |.  This. is,. I.|
00001270  20 74 68 69 6e 6b 2c 1a  20 74 68 65 1a 20 6d 61  | think,. the. ma|
00001280  6a 6f 72 1a 20 61 64 76  61 6e 74 61 67 65 1a 20  |jor. advantage. |
00001290  77 69 74 68 20 74 68 65  20 41 44 46 53 0d 76 65  |with the ADFS.ve|
000012a0  72 73 69 6f 6e 2e 1a 20  20 53 65 63 6f 6e 64 6c  |rsion..  Secondl|
000012b0  79 2c 20 74 68 65 20 20  6d 65 74 68 6f 64 73 20  |y, the  methods |
000012c0  77 68 69 63 68 20 63 61  6e 20 62 65 20 75 73 65  |which can be use|
000012d0  64 20 74 6f 1a 20 62 79  70 61 73 73 1a 20 74 68  |d to. bypass. th|
000012e0  65 1a 20 6e 65 77 65 72  0d 72 6f 75 74 69 6e 65  |e. newer.routine|
000012f0  20 61 72 65 1a 20 64 69  66 66 65 72 65 6e 74 2e  | are. different.|
00001300  1a 20 20 4f 72 2c 1a 20  73 68 6f 75 6c 64 1a 20  |.  Or,. should. |
00001310  49 1a 20 73 61 79 2c 20  6e 6f 6e 2d 65 78 69 73  |I. say, non-exis|
00001320  74 65 6e 74 20 61 73 20  66 61 72 20 61 73 20 49  |tent as far as I|
00001330  20 61 6d 0d 61 77 61 72  65 2e 20 20 49 74 20 73  | am.aware.  It s|
00001340  65 65 6d 73 20 74 68 61  74 20 77 68 65 6e 65 76  |eems that whenev|
00001350  65 72 20 74 68 65 20 72  6f 75 74 69 6e 65 1a 20  |er the routine. |
00001360  69 73 20 6f 70 65 72 61  74 69 6f 6e 61 6c 2c 20  |is operational, |
00001370  69 74 20 77 69 6c 6c 20  65 69 74 68 65 72 0d 77  |it will either.w|
00001380  6f 72 6b 20 31 30 30 25  20 70 72 6f 6d 70 74 69  |ork 100% prompti|
00001390  6e 67 20 61 62 6f 75 74  20 61 6c 6c 1a 20 66 69  |ng about all. fi|
000013a0  6c 65 73 1a 20 74 68 61  74 20 61 72 65 20 61 62  |les. that are ab|
000013b0  6f 75 74 20 74 6f 20 62  65 20 6f 76 65 72 77 72  |out to be overwr|
000013c0  69 74 74 65 6e 2c 20 6f  72 0d 74 68 65 20 6d 69  |itten, or.the mi|
000013d0  63 72 6f 20 77 69 6c 6c  20 68 61 6e 67 2d 75 70  |cro will hang-up|
000013e0  2e 0d 0d 52 6f 73 73 20  4c 69 74 74 6c 65 0d 41  |...Ross Little.A|
000013f0  70 72 69 6c 20 31 39 39  35 0d                    |pril 1995.|
000013fa
P/Safe1.m0
P/Safe1.m1
P/Safe1.m2
P/Safe1.m4
P/Safe1.m5