Home » Personal collection » Acorn ADFS disks » Electron » EUG_submission_3.ADF » SaveProt/text » Compare
Compare SaveProt/text with F/Prtct1
| File: | Personal collection » Acorn ADFS disks » Electron » EUG_submission_3.ADF » SaveProt/text |
| Compared with: | Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_21.ADF » F/Prtct1 |
| Similarity: | 99% of bytes duplicated |
99.2% of the bytes in these files are duplicated between them. Duplicated Different Padding (ignored)
Bytes are marked as duplicated if they lie within a run of at least 16 bytes which also appears somewhere in the other file, in any position. Long runs of padding bytes
(zeros, spaces, &FF and &E5) are ignored.
SaveProt/text
00000000 81 2e 2e 2e 2e 2e 2e 2e 2e 2e 2a 2e 2e 2e 2e 2e |..........*.....| 00000010 2e 2e 2a 2e 2e 2e 2e 2e 2e 2e 2a 2e 2e 2e 2e 2e |..*.......*.....| * 00000040 2e 2e 2a 2e 2e 2e 2e 2e 2e 2e 2a 2e 3c 0d 20 20 |..*.......*.<. | 00000050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000060 59 65 74 20 61 6e 6f 74 68 65 72 20 73 61 76 65 |Yet another save| 00000070 20 70 72 6f 74 65 63 74 69 6f 6e 20 70 72 6f 67 | protection prog| 00000080 72 61 6d 0d 0d 20 20 20 20 20 20 20 49 6e 20 45 |ram.. In E| 00000090 55 47 20 32 30 2c 20 52 6f 73 73 20 4c 69 74 74 |UG 20, Ross Litt| 000000a0 6c 65 20 70 72 65 73 65 6e 74 65 64 20 61 20 6e |le presented a n| 000000b0 65 77 20 76 65 72 73 69 6f 6e 20 6f 66 20 68 69 |ew version of hi| 000000c0 73 20 73 61 76 65 0d 70 72 6f 74 65 63 74 69 6f |s save.protectio| 000000d0 6e 20 70 72 6f 67 72 61 6d 2c 20 77 68 69 63 68 |n program, which| 000000e0 20 69 6e 74 65 72 63 65 70 74 65 64 20 6d 6f 73 | intercepted mos| 000000f0 74 20 66 69 6c 69 6e 67 20 73 79 73 74 65 6d 20 |t filing system | 00000100 6f 70 65 72 61 74 69 6f 6e 73 2c 20 61 6e 64 0d |operations, and.| 00000110 63 68 65 63 6b 65 64 2c 20 75 73 69 6e 67 20 61 |checked, using a| 00000120 6e 20 4f 53 46 49 4e 44 20 63 61 6c 6c 2c 20 74 |n OSFIND call, t| 00000130 6f 20 73 65 65 20 69 66 20 61 20 66 69 6c 65 20 |o see if a file | 00000140 65 78 69 73 74 65 64 20 62 65 66 6f 72 65 20 6f |existed before o| 00000150 76 65 72 77 72 69 74 69 6e 67 0d 69 74 2e 20 49 |verwriting.it. I| 00000160 20 77 72 6f 74 65 20 61 20 73 69 6d 69 6c 61 72 | wrote a similar| 00000170 20 70 72 6f 67 72 61 6d 20 73 65 76 65 72 61 6c | program several| 00000180 20 6d 6f 6e 74 68 73 20 61 67 6f 2c 20 77 68 65 | months ago, whe| 00000190 6e 20 47 75 73 20 44 6f 6e 6e 61 63 68 61 69 64 |n Gus Donnachaid| 000001a0 68 0d 73 75 67 67 65 73 74 65 64 20 74 68 65 20 |h.suggested the | 000001b0 69 64 65 61 2c 20 62 75 74 20 64 69 64 6e 27 74 |idea, but didn't| 000001c0 20 67 65 74 20 61 72 6f 75 6e 64 20 74 6f 20 73 | get around to s| 000001d0 65 6e 64 69 6e 67 20 69 74 20 69 6e 20 75 6e 74 |ending it in unt| 000001e0 69 6c 20 6e 6f 77 2e 20 54 68 65 0d 70 72 6f 67 |il now. The.prog| 000001f0 72 61 6d 20 77 6f 72 6b 73 20 69 6e 20 61 20 73 |ram works in a s| 00000200 69 6d 69 6c 61 72 20 6d 61 6e 6e 65 72 20 74 6f |imilar manner to| 00000210 20 52 6f 73 73 20 4c 69 74 74 6c 65 27 73 20 76 | Ross Little's v| 00000220 65 72 73 69 6f 6e 2c 20 65 78 63 65 70 74 20 74 |ersion, except t| 00000230 68 61 74 20 69 74 0d 75 73 65 73 20 61 20 73 6c |hat it.uses a sl| 00000240 69 67 68 74 6c 79 20 64 69 66 66 65 72 65 6e 74 |ightly different| 00000250 20 6d 65 74 68 6f 64 20 74 6f 20 74 65 73 74 20 | method to test | 00000260 66 6f 72 20 74 68 65 20 65 78 69 73 74 65 6e 63 |for the existenc| 00000270 65 20 6f 66 20 61 20 66 69 6c 65 2e 20 49 74 0d |e of a file. It.| 00000280 63 61 6c 6c 73 20 74 68 65 20 4f 53 46 49 4c 45 |calls the OSFILE| 00000290 20 72 6f 75 74 69 6e 65 20 77 69 74 68 20 74 68 | routine with th| 000002a0 65 20 61 63 63 75 6d 75 6c 61 74 6f 72 20 73 65 |e accumulator se| 000002b0 74 20 74 6f 20 35 20 2d 20 74 68 65 20 66 69 6c |t to 5 - the fil| 000002c0 65 20 74 79 70 65 20 69 73 0d 72 65 74 75 72 6e |e type is.return| 000002d0 65 64 20 69 6e 20 74 68 65 20 61 63 63 75 6d 75 |ed in the accumu| 000002e0 6c 61 74 6f 72 20 28 73 65 65 20 70 61 67 65 20 |lator (see page | 000002f0 39 37 20 6f 66 20 74 68 65 20 41 64 76 61 6e 63 |97 of the Advanc| 00000300 65 64 20 55 73 65 72 20 47 75 69 64 65 2c 20 6f |ed User Guide, o| 00000310 72 0d 70 61 67 65 20 38 34 20 6f 66 20 74 68 65 |r.page 84 of the| 00000320 20 41 63 6f 72 6e 20 50 6c 75 73 20 33 20 55 73 | Acorn Plus 3 Us| 00000330 65 72 20 47 75 69 64 65 20 69 66 20 79 6f 75 27 |er Guide if you'| 00000340 72 65 20 69 6e 74 65 72 65 73 74 65 64 29 2e 20 |re interested). | 00000350 41 6e 20 61 64 76 61 6e 74 61 67 65 0d 6f 66 20 |An advantage.of | 00000360 74 68 69 73 20 61 70 70 72 6f 61 63 68 20 69 73 |this approach is| 00000370 20 74 68 61 74 20 74 68 65 20 70 72 6f 67 72 61 | that the progra| 00000380 6d 20 63 61 6e 20 74 65 6c 6c 20 77 68 65 74 68 |m can tell wheth| 00000390 65 72 20 74 68 65 20 66 69 6c 65 20 69 6e 20 71 |er the file in q| 000003a0 75 65 73 74 69 6f 6e 0d 69 73 20 6c 6f 63 6b 65 |uestion.is locke| 000003b0 64 2c 20 6f 72 20 69 66 20 69 74 20 69 73 20 61 |d, or if it is a| 000003c0 20 64 69 72 65 63 74 6f 72 79 2e 20 49 6e 20 74 | directory. In t| 000003d0 68 65 73 65 20 63 61 73 65 73 2c 20 74 68 65 20 |hese cases, the | 000003e0 41 44 46 53 20 77 69 6c 6c 20 6e 6f 74 0d 61 6c |ADFS will not.al| 000003f0 6c 6f 77 20 61 6e 6f 74 68 65 72 20 66 69 6c 65 |low another file| 00000400 20 74 6f 20 62 65 20 73 61 76 65 64 20 77 69 74 | to be saved wit| 00000410 68 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 20 |h the same name | 00000420 2d 20 69 74 20 72 65 74 75 72 6e 73 20 77 69 74 |- it returns wit| 00000430 68 20 61 0d 22 4c 6f 63 6b 65 64 22 20 6f 72 20 |h a."Locked" or | 00000440 22 41 6c 72 65 61 64 79 20 65 78 69 73 74 73 22 |"Already exists"| 00000450 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 2e 20 | error message. | 00000460 48 65 6e 63 65 20 69 74 20 77 6f 75 6c 64 20 6f |Hence it would o| 00000470 6e 6c 79 20 77 61 73 74 65 20 74 69 6d 65 0d 69 |nly waste time.i| 00000480 6e 20 74 68 65 73 65 20 63 61 73 65 73 20 66 6f |n these cases fo| 00000490 72 20 74 68 65 20 53 61 76 65 20 50 72 6f 74 65 |r the Save Prote| 000004a0 63 74 69 6f 6e 20 70 72 6f 67 72 61 6d 20 74 6f |ction program to| 000004b0 20 61 73 6b 20 77 68 65 74 68 65 72 20 6f 72 20 | ask whether or | 000004c0 6e 6f 74 20 74 6f 0d 6f 76 65 72 77 72 69 74 65 |not to.overwrite| 000004d0 20 74 68 65 20 66 69 6c 65 2e 0d 20 20 20 20 20 | the file.. | 000004e0 20 20 41 6e 6f 74 68 65 72 20 66 65 61 74 75 72 | Another featur| 000004f0 65 20 6f 66 20 6d 79 20 70 72 6f 67 72 61 6d 20 |e of my program | 00000500 69 73 20 74 68 61 74 20 69 74 20 69 6e 74 65 72 |is that it inter| 00000510 63 65 70 74 73 20 74 68 65 20 4f 53 46 49 4e 44 |cepts the OSFIND| 00000520 0d 76 65 63 74 6f 72 2c 20 61 73 20 77 65 6c 6c |.vector, as well| 00000530 20 61 73 20 74 68 65 20 4f 53 46 49 4c 45 20 76 | as the OSFILE v| 00000540 65 63 74 6f 72 2e 20 54 68 69 73 20 6d 65 61 6e |ector. This mean| 00000550 73 20 74 68 61 74 20 69 74 20 63 61 6e 20 70 72 |s that it can pr| 00000560 6f 74 65 63 74 0d 61 67 61 69 6e 74 20 4f 50 45 |otect.againt OPE| 00000570 4e 4f 55 54 20 63 6f 6d 6d 61 6e 64 73 20 6f 76 |NOUT commands ov| 00000580 65 72 77 72 69 74 69 6e 67 20 65 78 69 73 74 69 |erwriting existi| 00000590 6e 67 20 66 69 6c 65 73 2c 20 61 73 20 77 65 6c |ng files, as wel| 000005a0 6c 20 61 73 20 53 41 56 45 20 61 6e 64 0d 2a 53 |l as SAVE and.*S| 000005b0 41 56 45 2e 20 49 20 74 68 6f 75 67 68 74 20 74 |AVE. I thought t| 000005c0 68 61 74 20 74 68 69 73 20 77 6f 75 6c 64 20 6d |hat this would m| 000005d0 61 6b 65 20 69 74 20 69 6d 70 6f 73 73 69 62 6c |ake it impossibl| 000005e0 65 20 74 6f 20 75 6e 77 69 74 74 69 6e 67 6c 79 |e to unwittingly| 000005f0 0d 6f 76 65 72 77 72 69 74 65 20 61 20 66 69 6c |.overwrite a fil| 00000600 65 2c 20 62 75 74 20 49 20 77 61 73 20 77 72 6f |e, but I was wro| 00000610 6e 67 20 2d 20 69 74 20 77 6f 75 6c 64 20 73 65 |ng - it would se| 00000620 65 6d 20 74 68 61 74 20 74 68 65 20 41 44 46 53 |em that the ADFS| 00000630 20 63 6f 6d 6d 61 6e 64 73 0d 2a 43 4f 50 59 20 | commands.*COPY | 00000640 61 6e 64 20 2a 52 45 4e 41 4d 45 20 64 6f 20 6e |and *RENAME do n| 00000650 6f 74 20 75 73 65 20 4f 53 46 49 4c 45 20 6f 72 |ot use OSFILE or| 00000660 20 4f 53 46 49 4e 44 2c 20 73 6f 20 74 68 65 79 | OSFIND, so they| 00000670 20 77 69 6c 6c 20 73 74 69 6c 6c 0d 6f 76 65 72 | will still.over| 00000680 77 72 69 74 65 20 65 78 69 73 74 69 6e 67 20 66 |write existing f| 00000690 69 6c 65 73 2e 20 0d 20 20 20 20 20 20 20 41 66 |iles. . Af| 000006a0 74 65 72 20 72 65 61 64 69 6e 67 20 52 6f 73 73 |ter reading Ross| 000006b0 20 4c 69 74 74 6c 65 27 73 20 70 72 6f 67 72 61 | Little's progra| 000006c0 6d 2c 20 49 20 63 6f 70 69 65 64 20 68 69 73 20 |m, I copied his | 000006d0 69 64 65 61 20 6f 66 20 69 6e 63 6c 75 64 69 6e |idea of includin| 000006e0 67 0d 61 20 66 61 63 69 6c 69 74 79 20 74 6f 20 |g.a facility to | 000006f0 64 69 73 61 62 6c 65 20 74 68 65 20 70 72 6f 67 |disable the prog| 00000700 72 61 6d 2c 20 61 6e 64 20 69 6e 63 6f 72 70 6f |ram, and incorpo| 00000710 72 61 74 65 64 20 74 68 69 73 20 69 6e 74 6f 20 |rated this into | 00000720 6d 79 20 70 72 6f 67 72 61 6d 0d 62 79 20 69 6e |my program.by in| 00000730 74 65 72 63 65 70 74 69 6e 67 20 74 68 65 20 4f |tercepting the O| 00000740 53 43 4c 49 20 76 65 63 74 6f 72 2c 20 61 6e 64 |SCLI vector, and| 00000750 20 74 65 73 74 6e 67 20 61 6c 6c 20 73 74 61 72 | testng all star| 00000760 20 63 6f 6d 6d 61 6e 64 73 2e 20 57 68 65 6e 20 | commands. When | 00000770 74 68 65 0d 63 6f 6d 6d 61 6e 64 20 2a 44 49 53 |the.command *DIS| 00000780 41 42 4c 45 20 69 73 20 65 6e 74 65 72 65 64 2c |ABLE is entered,| 00000790 20 74 68 65 20 76 65 63 74 6f 72 73 20 61 72 65 | the vectors are| 000007a0 20 61 6c 6c 20 72 65 73 65 74 20 74 6f 20 74 68 | all reset to th| 000007b0 65 69 72 20 6f 72 69 67 69 6e 61 6c 0d 76 61 6c |eir original.val| 000007c0 75 65 73 2c 20 73 6f 20 66 69 6c 65 73 20 63 61 |ues, so files ca| 000007d0 6e 20 62 65 20 6f 76 65 72 77 72 69 74 74 65 6e |n be overwritten| 000007e0 20 61 73 20 75 73 75 61 6c 2e 20 49 74 20 69 73 | as usual. It is| 000007f0 20 61 64 76 69 73 61 62 6c 65 20 74 6f 20 64 6f | advisable to do| 00000800 20 74 68 69 73 0d 62 65 66 6f 72 65 20 65 78 65 | this.before exe| 00000810 63 75 74 69 6e 67 20 61 6e 79 20 6d 61 63 68 69 |cuting any machi| 00000820 6e 65 20 63 6f 64 65 20 70 72 6f 67 72 61 6d 2c |ne code program,| 00000830 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 72 65 20 | unless you are | 00000840 73 75 72 65 20 69 74 20 77 69 6c 6c 20 6e 6f 74 |sure it will not| 00000850 0d 63 6f 72 72 75 70 74 20 74 68 65 20 53 61 76 |.corrupt the Sav| 00000860 65 20 50 72 6f 74 65 63 74 69 6f 6e 20 70 72 6f |e Protection pro| 00000870 67 72 61 6d 2e 0d 20 20 20 20 20 20 20 52 65 6d |gram.. Rem| 00000880 65 6d 62 65 72 20 61 6c 73 6f 2c 20 74 68 61 74 |ember also, that| 00000890 20 70 61 67 65 20 26 42 20 77 69 6c 6c 20 62 65 | page &B will be| 000008a0 20 63 6f 72 72 75 70 74 65 64 20 62 79 20 61 6e | corrupted by an| 000008b0 79 20 2a 4b 45 59 20 63 6f 6d 6d 61 6e 64 73 2c |y *KEY commands,| 000008c0 0d 61 6e 64 20 74 68 61 74 20 70 61 67 65 20 26 |.and that page &| 000008d0 43 20 77 69 6c 6c 20 62 65 20 63 6f 72 72 75 70 |C will be corrup| 000008e0 74 65 64 20 62 79 20 61 6e 79 20 56 44 55 20 32 |ted by any VDU 2| 000008f0 33 20 28 63 68 61 72 61 63 74 65 72 20 64 65 66 |3 (character def| 00000900 69 6e 69 74 69 6f 6e 29 0d 63 6f 6d 6d 61 6e 64 |inition).command| 00000910 73 2e 20 54 68 69 73 20 61 72 65 61 20 6f 66 20 |s. This area of | 00000920 6d 65 6d 6f 72 79 20 69 73 20 61 6c 73 6f 20 6c |memory is also l| 00000930 69 6b 65 6c 79 20 74 6f 20 62 65 20 75 73 65 64 |ikely to be used| 00000940 20 62 79 20 61 6e 79 20 41 44 54 0d 63 6f 6d 6d | by any ADT.comm| 00000950 61 6e 64 73 20 79 6f 75 20 75 73 65 2c 20 61 6e |ands you use, an| 00000960 64 20 70 61 67 65 20 39 20 69 73 20 75 73 65 64 |d page 9 is used| 00000970 20 62 79 20 74 68 65 20 45 30 30 20 41 44 46 53 | by the E00 ADFS| 00000980 2e 20 54 6f 20 61 76 6f 69 64 20 61 6c 6c 20 74 |. To avoid all t| 00000990 68 65 73 65 0d 70 69 74 66 61 6c 6c 73 2c 20 69 |hese.pitfalls, i| 000009a0 74 20 69 73 20 70 72 6f 62 61 62 6c 79 20 62 65 |t is probably be| 000009b0 74 74 65 72 20 74 6f 20 72 65 64 75 63 65 20 74 |tter to reduce t| 000009c0 68 65 20 76 61 6c 75 65 20 6f 66 20 48 49 4d 45 |he value of HIME| 000009d0 4d 20 74 6f 20 28 73 61 79 29 0d 26 35 43 30 30 |M to (say).&5C00| 000009e0 20 61 6e 64 20 73 74 6f 72 65 20 74 68 65 20 63 | and store the c| 000009f0 6f 64 65 20 62 65 74 77 65 65 6e 20 48 49 4d 45 |ode between HIME| 00000a00 4d 20 61 6e 64 20 73 63 72 65 65 6e 20 6d 65 6d |M and screen mem| 00000a10 6f 72 79 2e 20 54 68 69 73 20 77 69 6c 6c 20 6b |ory. This will k| 00000a20 65 65 70 0d 74 68 65 20 63 6f 64 65 20 73 61 66 |eep.the code saf| 00000a30 65 20 75 6e 74 69 6c 20 74 68 65 20 4d 6f 64 65 |e until the Mode| 00000a40 20 69 73 20 6e 65 78 74 20 63 68 61 6e 67 65 64 | is next changed| 00000a50 2c 20 77 68 69 63 68 20 69 73 20 6e 6f 74 20 6f |, which is not o| 00000a60 66 74 65 6e 20 69 66 20 79 6f 75 0d 61 72 65 20 |ften if you.are | 00000a70 74 79 70 69 6e 67 20 69 6e 20 6c 69 73 74 69 6e |typing in listin| 00000a80 67 73 2c 20 65 74 63 2e 20 54 6f 20 73 74 6f 72 |gs, etc. To stor| 00000a90 65 20 74 68 65 20 63 6f 64 65 20 68 65 72 65 2c |e the code here,| 00000aa0 20 79 6f 75 20 6d 75 73 74 20 72 65 6d 65 6d 62 | you must rememb| 00000ab0 65 72 20 74 6f 0d 63 68 61 6e 67 65 20 48 49 4d |er to.change HIM| 00000ac0 45 4d 20 62 65 66 6f 72 65 20 61 73 73 65 6d 62 |EM before assemb| 00000ad0 6c 69 6e 67 20 74 68 65 20 73 6f 75 72 63 65 20 |ling the source | 00000ae0 63 6f 64 65 20 41 4e 44 20 62 65 66 6f 72 65 20 |code AND before | 00000af0 72 75 6e 6e 69 6e 67 20 74 68 65 20 63 6f 64 65 |running the code| 00000b00 0d 65 61 63 68 20 74 69 6d 65 20 79 6f 75 20 75 |.each time you u| 00000b10 73 65 20 69 74 2e 0d 20 20 20 20 20 20 20 45 76 |se it.. Ev| 00000b20 65 6e 20 62 65 74 74 65 72 20 77 6f 75 6c 64 20 |en better would | 00000b30 62 65 20 74 6f 20 73 74 6f 72 65 20 74 68 65 20 |be to store the | 00000b40 63 6f 64 65 20 70 65 72 6d 61 6e 65 6e 74 6c 79 |code permanently| 00000b50 20 69 6e 0d 62 61 74 74 65 72 79 2d 62 61 63 6b | in.battery-back| 00000b60 65 64 20 52 41 4d 2c 20 61 73 20 61 20 73 65 72 |ed RAM, as a ser| 00000b70 76 69 63 65 20 52 4f 4d 2e 20 54 68 69 73 20 77 |vice ROM. This w| 00000b80 6f 75 6c 64 20 62 65 20 73 65 74 20 75 70 20 61 |ould be set up a| 00000b90 75 74 6f 6d 61 74 69 63 61 6c 6c 79 0d 65 76 65 |utomatically.eve| 00000ba0 72 79 20 74 69 6d 65 20 79 6f 75 20 73 77 69 74 |ry time you swit| 00000bb0 63 68 20 74 68 65 20 6d 61 63 68 69 6e 65 20 6f |ch the machine o| 00000bc0 6e 2c 20 61 6e 64 20 77 6f 75 6c 64 20 62 65 20 |n, and would be | 00000bd0 61 6c 6d 6f 73 74 20 69 6d 6d 75 6e 65 20 74 6f |almost immune to| 00000be0 0d 63 6f 72 72 75 70 74 69 6f 6e 20 62 79 20 6f |.corruption by o| 00000bf0 74 68 65 72 20 70 72 6f 67 72 61 6d 73 2e 20 49 |ther programs. I| 00000c00 74 20 77 6f 75 6c 64 20 6e 65 65 64 20 74 6f 20 |t would need to | 00000c10 75 74 69 6c 69 73 65 20 74 68 65 20 65 78 74 65 |utilise the exte| 00000c20 6e 64 65 64 20 76 65 63 74 6f 72 0d 73 79 73 74 |nded vector.syst| 00000c30 65 6d 20 28 73 65 65 20 41 64 76 61 6e 63 65 64 |em (see Advanced| 00000c40 20 55 73 65 72 20 47 75 69 64 65 2c 20 70 61 67 | User Guide, pag| 00000c50 65 73 20 31 37 31 20 61 6e 64 20 31 38 39 29 2e |es 171 and 189).| 00000c60 20 49 20 68 61 76 65 20 74 6f 20 61 64 6d 69 74 | I have to admit| 00000c70 20 74 68 61 74 0d 64 65 73 70 69 74 65 20 77 72 | that.despite wr| 00000c80 69 74 69 6e 67 20 74 68 65 20 70 72 6f 67 72 61 |iting the progra| 00000c90 6d 2c 20 49 20 68 61 76 65 20 6e 6f 20 69 6e 74 |m, I have no int| 00000ca0 65 6e 74 69 6f 6e 20 6f 66 20 75 73 69 6e 67 20 |ention of using | 00000cb0 69 74 20 6f 6e 20 61 20 72 65 67 75 6c 61 72 0d |it on a regular.| 00000cc0 62 61 73 69 73 2e 20 49 20 68 61 76 65 20 61 6c |basis. I have al| 00000cd0 72 65 61 64 79 20 67 6f 74 20 69 6e 74 6f 20 74 |ready got into t| 00000ce0 68 65 20 68 61 62 69 74 20 6f 66 20 6c 6f 63 6b |he habit of lock| 00000cf0 69 6e 67 20 61 6c 6c 20 70 72 6f 67 72 61 6d 73 |ing all programs| 00000d00 0d 74 68 61 74 20 61 72 65 20 6f 66 20 61 6e 79 |.that are of any| 00000d10 20 76 61 6c 75 65 20 77 68 65 6e 20 49 20 61 6d | value when I am| 00000d20 20 6e 6f 74 20 77 6f 72 6b 69 6e 67 20 6f 6e 20 | not working on | 00000d30 74 68 65 6d 2c 20 61 6e 64 20 69 6e 20 61 6e 79 |them, and in any| 00000d40 20 63 61 73 65 2c 20 69 66 20 49 0d 77 61 73 20 | case, if I.was | 00000d50 69 6e 20 61 20 73 75 66 66 69 63 69 65 6e 74 6c |in a sufficientl| 00000d60 79 20 61 62 73 65 6e 74 2d 6d 69 6e 64 65 64 20 |y absent-minded | 00000d70 6d 6f 6f 64 20 74 6f 20 6f 76 65 72 77 72 69 74 |mood to overwrit| 00000d80 65 20 61 20 66 69 6c 65 20 62 79 20 6d 69 73 74 |e a file by mist| 00000d90 61 6b 65 2c 0d 49 20 77 6f 75 6c 64 20 70 72 6f |ake,.I would pro| 00000da0 62 61 62 6c 79 20 68 61 76 65 20 66 6f 72 67 6f |bably have forgo| 00000db0 74 74 65 6e 20 74 6f 20 6c 6f 61 64 20 74 68 65 |tten to load the| 00000dc0 20 70 72 6f 74 65 63 74 69 6f 6e 20 70 72 6f 67 | protection prog| 00000dd0 72 61 6d 20 61 73 20 77 65 6c 6c 21 0d 48 6f 77 |ram as well!.How| 00000de0 65 76 65 72 2c 20 69 66 20 74 68 65 20 70 72 6f |ever, if the pro| 00000df0 67 72 61 6d 20 63 6f 75 6c 64 20 62 65 20 6d 61 |gram could be ma| 00000e00 64 65 20 74 6f 20 77 6f 72 6b 20 70 65 72 6d 61 |de to work perma| 00000e10 6e 65 6e 74 6c 79 20 69 6e 20 73 69 64 65 77 61 |nently in sidewa| 00000e20 79 73 20 52 41 4d 2c 0d 69 74 20 77 6f 75 6c 64 |ys RAM,.it would| 00000e30 20 62 65 20 66 61 72 20 6d 6f 72 65 20 75 73 65 | be far more use| 00000e40 66 75 6c 2e 20 49 20 77 69 6c 6c 20 69 6e 76 65 |ful. I will inve| 00000e50 73 74 69 67 61 74 65 20 74 68 69 73 20 70 6f 73 |stigate this pos| 00000e60 73 69 62 69 6c 69 74 79 0d 66 75 72 74 68 65 72 |sibility.further| 00000e70 2e 2e 2e 20 0d 20 20 20 20 20 20 20 4e 6f 74 65 |... . Note| 00000e80 20 74 68 61 74 20 77 68 65 6e 20 74 68 65 20 70 | that when the p| 00000e90 72 6f 67 72 61 6d 20 61 73 6b 73 20 77 68 65 74 |rogram asks whet| 00000ea0 68 65 72 20 61 20 66 69 6c 65 20 73 68 6f 75 6c |her a file shoul| 00000eb0 64 20 62 65 0d 6f 76 65 72 77 72 69 74 74 65 6e |d be.overwritten| 00000ec0 2c 20 79 6f 75 20 6d 75 73 74 20 61 6e 73 77 65 |, you must answe| 00000ed0 72 20 77 69 74 68 20 74 68 65 20 77 6f 72 64 20 |r with the word | 00000ee0 22 59 45 53 22 20 28 75 70 70 65 72 20 6f 72 20 |"YES" (upper or | 00000ef0 6c 6f 77 65 72 20 63 61 73 65 29 20 69 6e 0d 66 |lower case) in.f| 00000f00 75 6c 6c 20 2d 20 61 6e 79 20 6f 74 68 65 72 20 |ull - any other | 00000f10 6b 65 79 20 77 69 6c 6c 20 67 69 76 65 20 74 68 |key will give th| 00000f20 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 |e error message | 00000f30 22 41 62 6f 72 74 65 64 22 2e 20 54 68 69 73 20 |"Aborted". This | 00000f40 69 73 20 74 68 65 0d 73 74 61 6e 64 61 72 64 20 |is the.standard | 00000f50 70 72 6f 63 65 64 75 72 65 20 75 73 65 64 20 62 |procedure used b| 00000f60 79 20 74 68 65 20 41 44 46 53 20 77 68 65 6e 20 |y the ADFS when | 00000f70 61 73 6b 69 6e 67 20 66 6f 72 20 63 6f 6e 66 69 |asking for confi| 00000f80 72 6d 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 0d |rmation for the.| 00000f90 2a 44 45 53 54 52 4f 59 20 63 6f 6d 6d 61 6e 64 |*DESTROY command| 00000fa0 2e 20 52 65 6d 65 6d 62 65 72 20 74 68 61 74 20 |. Remember that | 00000fb0 74 68 65 20 22 41 62 6f 72 74 65 64 22 20 65 72 |the "Aborted" er| 00000fc0 72 6f 72 20 6d 61 79 20 63 61 75 73 65 20 61 20 |ror may cause a | 00000fd0 42 41 53 49 43 0d 70 72 6f 67 72 61 6d 20 74 6f |BASIC.program to| 00000fe0 20 73 74 6f 70 20 69 66 20 69 74 20 68 61 73 20 | stop if it has | 00000ff0 69 6e 61 64 65 71 75 61 74 65 20 65 72 72 6f 72 |inadequate error| 00001000 20 74 72 61 70 70 69 6e 67 2e 20 48 6f 77 65 76 | trapping. Howev| 00001010 65 72 2c 20 69 74 20 69 73 20 61 6c 77 61 79 73 |er, it is always| 00001020 0d 75 6e 77 69 73 65 20 74 6f 20 75 73 65 20 74 |.unwise to use t| 00001030 68 65 20 70 72 6f 74 65 63 74 69 6f 6e 20 70 72 |he protection pr| 00001040 6f 67 72 61 6d 20 66 72 6f 6d 20 69 6e 73 69 64 |ogram from insid| 00001050 65 20 61 6e 6f 74 68 65 72 20 70 72 6f 67 72 61 |e another progra| 00001060 6d 2c 20 69 6e 20 63 61 73 65 0d 6f 66 20 63 6f |m, in case.of co| 00001070 72 72 75 70 74 69 6e 67 20 74 68 65 20 63 6f 64 |rrupting the cod| 00001080 65 2c 20 73 6f 20 74 68 69 73 20 73 68 6f 75 6c |e, so this shoul| 00001090 64 20 6e 6f 74 20 62 65 20 61 20 6d 61 6a 6f 72 |d not be a major| 000010a0 20 70 72 6f 62 6c 65 6d 2e 0d 20 20 20 20 20 20 | problem.. | 000010b0 20 41 73 20 77 69 74 68 20 52 6f 73 73 20 4c 69 | As with Ross Li| 000010c0 74 74 6c 65 27 73 20 70 72 6f 67 72 61 6d 20 49 |ttle's program I| 000010d0 20 68 61 76 65 20 69 6e 63 6c 75 64 65 64 20 61 | have included a| 000010e0 20 63 68 65 63 6b 20 74 6f 20 6d 61 6b 65 20 73 | check to make s| 000010f0 75 72 65 0d 74 68 61 74 20 74 68 65 20 73 65 74 |ure.that the set| 00001100 75 70 20 72 6f 75 74 69 6e 65 20 69 73 20 6e 6f |up routine is no| 00001110 74 20 65 78 65 63 75 74 65 64 20 74 77 69 63 65 |t executed twice| 00001120 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 77 69 6c |, though you wil| 00001130 6c 20 73 74 69 6c 6c 20 72 75 6e 0d 69 6e 74 6f |l still run.into| 00001140 20 74 72 6f 75 62 6c 65 20 69 66 20 79 6f 75 20 | trouble if you | 00001150 72 75 6e 20 61 20 73 65 63 6f 6e 64 20 63 6f 70 |run a second cop| 00001160 79 20 77 68 69 63 68 20 77 61 73 20 61 73 65 6d |y which was asem| 00001170 62 6c 65 64 20 61 74 20 61 20 64 69 66 66 65 72 |bled at a differ| 00001180 65 6e 74 0d 61 64 64 72 65 73 73 2e 20 49 66 20 |ent.address. If | 00001190 74 68 65 20 63 6f 64 65 20 62 65 63 6f 6d 65 73 |the code becomes| 000011a0 20 63 6f 72 72 75 70 74 65 64 20 66 6f 72 20 61 | corrupted for a| 000011b0 6e 79 20 72 65 61 73 6f 6e 2c 20 70 72 65 73 73 |ny reason, press| 000011c0 20 43 54 52 4c 2d 42 52 45 41 4b 2c 0d 73 61 76 | CTRL-BREAK,.sav| 000011d0 65 20 79 6f 75 72 20 77 6f 72 6b 20 69 66 20 69 |e your work if i| 000011e0 74 20 69 73 20 73 74 69 6c 6c 20 69 6e 74 61 63 |t is still intac| 000011f0 74 2c 20 74 68 65 6e 20 72 65 2d 69 6e 73 74 61 |t, then re-insta| 00001200 6c 6c 20 74 68 65 20 70 72 6f 74 65 63 74 69 6f |ll the protectio| 00001210 6e 0d 70 72 6f 67 72 61 6d 2e 20 52 6f 73 73 20 |n.program. Ross | 00001220 4c 69 74 74 6c 65 20 6d 65 6e 74 69 6f 6e 65 64 |Little mentioned| 00001230 20 69 6e 20 45 55 47 32 30 20 74 68 61 74 20 74 | in EUG20 that t| 00001240 68 69 73 20 66 65 61 74 75 72 65 20 64 69 64 20 |his feature did | 00001250 6e 6f 74 20 77 6f 72 6b 0d 70 72 6f 70 65 72 6c |not work.properl| 00001260 79 20 69 6e 20 68 69 73 20 44 46 53 20 76 65 72 |y in his DFS ver| 00001270 73 69 6f 6e 20 6f 66 20 74 68 65 20 70 72 6f 67 |sion of the prog| 00001280 72 61 6d 2e 20 54 68 65 20 70 72 6f 62 6c 65 6d |ram. The problem| 00001290 20 77 61 73 20 74 68 61 74 20 74 68 65 0d 63 6f | was that the.co| 000012a0 6e 74 65 6e 74 73 20 6f 66 20 74 68 65 20 4f 53 |ntents of the OS| 000012b0 46 49 4c 45 20 76 65 63 74 6f 72 20 77 65 72 65 |FILE vector were| 000012c0 20 63 6f 70 69 65 64 20 69 6e 74 6f 20 74 68 65 | copied into the| 000012d0 20 22 72 65 74 75 72 6e 22 20 76 65 63 74 6f 72 | "return" vector| 000012e0 20 28 75 73 65 64 0d 74 6f 20 63 61 72 72 79 20 | (used.to carry | 000012f0 6f 75 74 20 74 68 65 20 4f 53 46 49 4c 45 20 63 |out the OSFILE c| 00001300 61 6c 6c 20 61 74 20 74 68 65 20 65 6e 64 20 6f |all at the end o| 00001310 66 20 74 68 65 20 72 6f 75 74 69 6e 65 29 2c 20 |f the routine), | 00001320 62 65 66 6f 72 65 20 74 68 65 20 63 68 65 63 6b |before the check| 00001330 0d 77 61 73 20 6d 61 64 65 20 74 6f 20 66 69 6e |.was made to fin| 00001340 64 20 6f 75 74 20 69 66 20 74 68 65 20 70 72 6f |d out if the pro| 00001350 67 72 61 6d 20 68 61 64 20 61 6c 72 65 61 64 79 |gram had already| 00001360 20 62 65 65 6e 20 69 6e 73 74 61 6c 6c 65 64 2e | been installed.| 00001370 20 54 68 69 73 20 6d 65 61 6e 73 0d 74 68 61 74 | This means.that| 00001380 20 61 66 74 65 72 20 74 68 65 20 70 72 6f 67 72 | after the progr| 00001390 61 6d 20 69 73 20 72 75 6e 20 74 68 65 20 73 65 |am is run the se| 000013a0 63 6f 6e 64 20 74 69 6d 65 2c 20 62 6f 74 68 20 |cond time, both | 000013b0 74 68 65 20 72 65 61 6c 20 76 65 63 74 6f 72 20 |the real vector | 000013c0 61 6e 64 0d 74 68 65 20 72 65 74 75 72 6e 20 76 |and.the return v| 000013d0 65 63 74 6f 72 20 70 6f 69 6e 74 20 74 6f 20 74 |ector point to t| 000013e0 68 65 20 73 74 61 72 74 20 6f 66 20 74 68 65 20 |he start of the | 000013f0 50 72 6f 74 65 63 74 69 6f 6e 20 70 72 6f 67 72 |Protection progr| 00001400 61 6d 2e 20 54 68 69 73 0d 65 78 70 6c 61 69 6e |am. This.explain| 00001410 73 20 77 68 79 20 69 74 20 65 6e 74 65 72 73 20 |s why it enters | 00001420 61 6e 20 65 6e 64 6c 65 73 73 20 6c 6f 6f 70 20 |an endless loop | 00001430 77 68 65 6e 20 72 75 6e 2e 20 54 68 65 20 73 6f |when run. The so| 00001440 6c 75 74 69 6f 6e 20 6f 66 20 63 6f 75 72 73 65 |lution of course| 00001450 2c 0d 69 73 20 74 6f 20 73 77 61 70 20 61 72 6f |,.is to swap aro| 00001460 75 6e 64 20 74 68 65 20 66 69 72 73 74 20 66 65 |und the first fe| 00001470 77 20 6c 69 6e 65 73 20 6f 66 20 74 68 65 20 63 |w lines of the c| 00001480 6f 64 65 2c 20 73 6f 20 74 68 65 20 63 68 65 63 |ode, so the chec| 00001490 6b 20 69 73 20 6d 61 64 65 0d 62 65 66 6f 72 65 |k is made.before| 000014a0 20 61 6e 79 20 63 68 61 6e 67 65 73 20 61 72 65 | any changes are| 000014b0 20 6d 61 64 65 3a 0d 20 20 20 20 20 20 20 20 20 | made:. | 000014c0 20 20 20 20 20 20 31 36 30 2e 69 6e 69 74 20 20 | 160.init | 000014d0 4c 44 41 66 69 6c 65 76 2b 31 0d 20 20 20 20 20 |LDAfilev+1. | 000014e0 20 20 20 20 20 20 20 20 20 20 31 37 30 20 20 20 | 170 | 000014f0 20 20 20 20 43 4d 50 23 6e 65 77 76 20 44 49 56 | CMP#newv DIV| 00001500 20 32 35 36 0d 20 20 20 20 20 20 20 20 20 20 20 | 256. | 00001510 20 20 20 20 31 38 30 20 20 20 20 20 20 20 42 45 | 180 BE| 00001520 51 65 6e 64 20 20 0d 20 20 20 20 20 20 20 20 20 |Qend . | 00001530 20 20 20 20 20 20 31 39 30 20 20 20 20 20 20 20 | 190 | 00001540 53 54 41 72 65 74 76 2b 31 0d 20 20 20 20 20 20 |STAretv+1. | 00001550 20 20 20 20 20 20 20 20 20 32 30 30 20 20 20 20 | 200 | 00001560 20 20 20 4c 44 41 66 69 6c 65 76 0d 20 20 20 20 | LDAfilev. | 00001570 20 20 20 20 20 20 20 20 20 20 20 32 31 30 20 20 | 210 | 00001580 20 20 20 20 20 53 54 41 72 65 74 76 0d 20 20 20 | STAretv. | 00001590 20 20 20 20 20 20 20 20 20 20 65 74 63 2e 2e 2e | etc...| 000015a0 2e 0d 20 20 20 20 20 20 20 48 6f 77 65 76 65 72 |.. However| 000015b0 2c 20 74 68 69 73 20 69 73 20 6e 6f 74 20 74 68 |, this is not th| 000015c0 65 20 65 6e 64 20 6f 66 20 74 68 65 20 73 74 6f |e end of the sto| 000015d0 72 79 2c 20 62 65 63 61 75 73 65 20 69 66 20 74 |ry, because if t| 000015e0 68 65 20 53 41 46 45 0d 70 72 6f 67 72 61 6d 20 |he SAFE.program | 000015f0 68 61 73 20 62 65 65 6e 20 72 75 6e 20 61 20 73 |has been run a s| 00001600 65 63 6f 6e 64 20 74 69 6d 65 20 75 73 69 6e 67 |econd time using| 00001610 20 2a 53 41 46 45 20 28 61 73 20 6f 70 70 6f 73 | *SAFE (as oppos| 00001620 65 64 20 74 6f 20 43 41 4c 4c 26 39 30 30 29 2c |ed to CALL&900),| 00001630 0d 74 68 65 20 72 65 74 75 72 6e 20 76 65 63 74 |.the return vect| 00001640 6f 72 73 20 77 69 6c 6c 20 68 61 76 65 20 62 65 |ors will have be| 00001650 65 6e 20 6f 76 65 72 77 72 69 74 74 65 6e 20 77 |en overwritten w| 00001660 69 74 68 20 7a 65 72 6f 73 2c 20 61 6e 64 20 74 |ith zeros, and t| 00001670 68 65 20 6f 72 69 67 69 6e 61 6c 0d 63 6f 6e 74 |he original.cont| 00001680 65 6e 74 73 20 6f 66 20 74 68 65 20 76 65 63 74 |ents of the vect| 00001690 6f 72 73 20 6c 6f 73 74 2e 20 54 68 65 79 20 63 |ors lost. They c| 000016a0 61 6e 6e 6f 74 20 62 65 20 72 65 73 74 6f 72 65 |annot be restore| 000016b0 64 20 75 73 69 6e 67 20 74 68 65 20 64 65 66 61 |d using the defa| 000016c0 75 6c 74 0d 76 65 63 74 6f 72 20 74 61 62 6c 65 |ult.vector table| 000016d0 20 69 6e 20 74 68 65 20 4f 53 20 52 4f 4d 2c 20 | in the OS ROM, | 000016e0 73 69 6e 63 65 20 74 68 69 73 20 77 69 6c 6c 20 |since this will | 000016f0 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 74 61 70 |point to the tap| 00001700 65 20 66 69 6c 69 6e 67 0d 73 79 73 74 65 6d 2e |e filing.system.| 00001710 20 54 68 65 20 73 6f 6c 75 74 69 6f 6e 20 68 65 | The solution he| 00001720 72 65 20 69 73 20 74 6f 20 70 75 74 20 74 68 65 |re is to put the| 00001730 20 72 65 74 75 72 6e 20 76 65 63 74 6f 72 73 20 | return vectors | 00001740 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 |at the end of th| 00001750 65 0d 70 72 6f 67 72 61 6d 2c 20 61 6e 64 20 6e |e.program, and n| 00001760 6f 74 20 74 6f 20 69 6e 63 6c 75 64 65 20 74 68 |ot to include th| 00001770 65 6d 20 69 6e 20 74 68 65 20 73 61 76 65 64 20 |em in the saved | 00001780 66 69 6c 65 2e 20 54 68 69 73 20 6d 65 61 6e 73 |file. This means| 00001790 20 74 68 61 74 20 74 68 65 79 0d 77 69 6c 6c 20 | that they.will | 000017a0 6e 6f 74 20 62 65 20 6f 76 65 72 77 72 69 74 74 |not be overwritt| 000017b0 65 6e 20 77 68 65 6e 20 74 68 65 20 53 41 46 45 |en when the SAFE| 000017c0 20 70 72 6f 67 72 61 6d 20 69 73 20 72 65 2d 6c | program is re-l| 000017d0 6f 61 64 65 64 2e 20 54 68 69 73 20 69 73 20 68 |oaded. This is h| 000017e0 6f 77 20 49 0d 61 76 6f 69 64 65 64 20 74 68 65 |ow I.avoided the| 000017f0 20 70 72 6f 62 6c 65 6d 20 69 6e 20 6d 79 20 70 | problem in my p| 00001800 72 6f 67 72 61 6d 2e 0d 20 20 20 20 20 20 20 4d |rogram.. M| 00001810 79 20 70 72 6f 67 72 61 6d 20 69 73 20 64 65 73 |y program is des| 00001820 69 67 6e 65 64 20 74 6f 20 77 6f 72 6b 20 6f 6e |igned to work on| 00001830 20 62 6f 74 68 20 41 44 46 53 20 61 6e 64 20 44 | both ADFS and D| 00001840 46 53 2c 20 73 69 6e 63 65 20 69 74 20 6f 6e 6c |FS, since it onl| 00001850 79 0d 75 73 65 73 20 22 6c 65 67 61 6c 22 20 6f |y.uses "legal" o| 00001860 70 65 72 61 74 69 6e 67 20 73 79 73 74 65 6d 20 |perating system | 00001870 63 61 6c 6c 73 2c 20 77 68 69 63 68 20 61 72 65 |calls, which are| 00001880 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 68 2e | common to both.| 00001890 20 48 6f 77 65 76 65 72 2c 20 49 0d 64 6f 20 6e | However, I.do n| 000018a0 6f 74 20 68 61 76 65 20 61 20 44 46 53 20 52 4f |ot have a DFS RO| 000018b0 4d 20 74 6f 20 74 65 73 74 20 74 68 69 73 2c 20 |M to test this, | 000018c0 73 6f 20 49 20 77 6f 75 6c 64 20 62 65 20 69 6e |so I would be in| 000018d0 74 65 72 65 73 74 65 64 20 74 6f 20 68 65 61 72 |terested to hear| 000018e0 20 69 66 20 69 74 0d 69 73 20 6e 6f 74 20 63 6f | if it.is not co| 000018f0 6d 70 61 74 69 62 6c 65 2c 20 6f 72 20 69 66 20 |mpatible, or if | 00001900 74 68 65 72 65 20 61 72 65 20 61 6e 79 20 62 75 |there are any bu| 00001910 67 73 2e 0d 20 20 20 20 20 20 20 20 20 20 20 20 |gs.. | 00001920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001940 20 20 20 20 20 20 4d 61 74 74 68 65 77 20 46 6f | Matthew Fo| 00001950 72 64 0d |rd.| 00001953
F/Prtct1
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000010 20 20 59 65 74 20 61 6e 6f 74 68 65 72 20 73 61 | Yet another sa| 00000020 76 65 20 70 72 6f 74 65 63 74 69 6f 6e 20 70 72 |ve protection pr| 00000030 6f 67 72 61 6d 0d 0d 20 20 20 20 20 20 20 49 6e |ogram.. In| 00000040 20 45 55 47 20 32 30 2c 20 52 6f 73 73 20 4c 69 | EUG 20, Ross Li| 00000050 74 74 6c 65 20 70 72 65 73 65 6e 74 65 64 20 61 |ttle presented a| 00000060 20 6e 65 77 20 76 65 72 73 69 6f 6e 20 6f 66 20 | new version of | 00000070 68 69 73 20 73 61 76 65 0d 70 72 6f 74 65 63 74 |his save.protect| 00000080 69 6f 6e 20 70 72 6f 67 72 61 6d 2c 20 77 68 69 |ion program, whi| 00000090 63 68 20 69 6e 74 65 72 63 65 70 74 65 64 20 6d |ch intercepted m| 000000a0 6f 73 74 20 66 69 6c 69 6e 67 20 73 79 73 74 65 |ost filing syste| 000000b0 6d 20 6f 70 65 72 61 74 69 6f 6e 73 2c 20 61 6e |m operations, an| 000000c0 64 0d 63 68 65 63 6b 65 64 2c 20 75 73 69 6e 67 |d.checked, using| 000000d0 20 61 6e 20 4f 53 46 49 4e 44 20 63 61 6c 6c 2c | an OSFIND call,| 000000e0 20 74 6f 20 73 65 65 20 69 66 20 61 20 66 69 6c | to see if a fil| 000000f0 65 20 65 78 69 73 74 65 64 20 62 65 66 6f 72 65 |e existed before| 00000100 20 6f 76 65 72 77 72 69 74 69 6e 67 0d 69 74 2e | overwriting.it.| 00000110 20 49 20 77 72 6f 74 65 20 61 20 73 69 6d 69 6c | I wrote a simil| 00000120 61 72 20 70 72 6f 67 72 61 6d 20 73 65 76 65 72 |ar program sever| 00000130 61 6c 20 6d 6f 6e 74 68 73 20 61 67 6f 2c 20 77 |al months ago, w| 00000140 68 65 6e 20 47 75 73 20 44 6f 6e 6e 61 63 68 61 |hen Gus Donnacha| 00000150 69 64 68 0d 73 75 67 67 65 73 74 65 64 20 74 68 |idh.suggested th| 00000160 65 20 69 64 65 61 2c 20 62 75 74 20 64 69 64 6e |e idea, but didn| 00000170 27 74 20 67 65 74 20 61 72 6f 75 6e 64 20 74 6f |'t get around to| 00000180 20 73 65 6e 64 69 6e 67 20 69 74 20 69 6e 20 75 | sending it in u| 00000190 6e 74 69 6c 20 6e 6f 77 2e 20 54 68 65 0d 70 72 |ntil now. The.pr| 000001a0 6f 67 72 61 6d 20 77 6f 72 6b 73 20 69 6e 20 61 |ogram works in a| 000001b0 20 73 69 6d 69 6c 61 72 20 6d 61 6e 6e 65 72 20 | similar manner | 000001c0 74 6f 20 52 6f 73 73 20 4c 69 74 74 6c 65 27 73 |to Ross Little's| 000001d0 20 76 65 72 73 69 6f 6e 2c 20 65 78 63 65 70 74 | version, except| 000001e0 20 74 68 61 74 20 69 74 0d 75 73 65 73 20 61 20 | that it.uses a | 000001f0 73 6c 69 67 68 74 6c 79 20 64 69 66 66 65 72 65 |slightly differe| 00000200 6e 74 20 6d 65 74 68 6f 64 20 74 6f 20 74 65 73 |nt method to tes| 00000210 74 20 66 6f 72 20 74 68 65 20 65 78 69 73 74 65 |t for the existe| 00000220 6e 63 65 20 6f 66 20 61 20 66 69 6c 65 2e 20 49 |nce of a file. I| 00000230 74 0d 63 61 6c 6c 73 20 74 68 65 20 4f 53 46 49 |t.calls the OSFI| 00000240 4c 45 20 72 6f 75 74 69 6e 65 20 77 69 74 68 20 |LE routine with | 00000250 74 68 65 20 61 63 63 75 6d 75 6c 61 74 6f 72 20 |the accumulator | 00000260 73 65 74 20 74 6f 20 35 20 2d 20 74 68 65 20 66 |set to 5 - the f| 00000270 69 6c 65 20 74 79 70 65 20 69 73 0d 72 65 74 75 |ile type is.retu| 00000280 72 6e 65 64 20 69 6e 20 74 68 65 20 61 63 63 75 |rned in the accu| 00000290 6d 75 6c 61 74 6f 72 20 28 73 65 65 20 70 61 67 |mulator (see pag| 000002a0 65 20 39 37 20 6f 66 20 74 68 65 20 41 64 76 61 |e 97 of the Adva| 000002b0 6e 63 65 64 20 55 73 65 72 20 47 75 69 64 65 2c |nced User Guide,| 000002c0 20 6f 72 0d 70 61 67 65 20 38 34 20 6f 66 20 74 | or.page 84 of t| 000002d0 68 65 20 41 63 6f 72 6e 20 50 6c 75 73 20 33 20 |he Acorn Plus 3 | 000002e0 55 73 65 72 20 47 75 69 64 65 20 69 66 20 79 6f |User Guide if yo| 000002f0 75 27 72 65 20 69 6e 74 65 72 65 73 74 65 64 29 |u're interested)| 00000300 2e 20 41 6e 20 61 64 76 61 6e 74 61 67 65 0d 6f |. An advantage.o| 00000310 66 20 74 68 69 73 20 61 70 70 72 6f 61 63 68 20 |f this approach | 00000320 69 73 20 74 68 61 74 20 74 68 65 20 70 72 6f 67 |is that the prog| 00000330 72 61 6d 20 63 61 6e 20 74 65 6c 6c 20 77 68 65 |ram can tell whe| 00000340 74 68 65 72 20 74 68 65 20 66 69 6c 65 20 69 6e |ther the file in| 00000350 20 71 75 65 73 74 69 6f 6e 0d 69 73 20 6c 6f 63 | question.is loc| 00000360 6b 65 64 2c 20 6f 72 20 69 66 20 69 74 20 69 73 |ked, or if it is| 00000370 20 61 20 64 69 72 65 63 74 6f 72 79 2e 20 49 6e | a directory. In| 00000380 20 74 68 65 73 65 20 63 61 73 65 73 2c 20 74 68 | these cases, th| 00000390 65 20 41 44 46 53 20 77 69 6c 6c 20 6e 6f 74 0d |e ADFS will not.| 000003a0 61 6c 6c 6f 77 20 61 6e 6f 74 68 65 72 20 66 69 |allow another fi| 000003b0 6c 65 20 74 6f 20 62 65 20 73 61 76 65 64 20 77 |le to be saved w| 000003c0 69 74 68 20 74 68 65 20 73 61 6d 65 20 6e 61 6d |ith the same nam| 000003d0 65 20 2d 20 69 74 20 72 65 74 75 72 6e 73 20 77 |e - it returns w| 000003e0 69 74 68 20 61 0d 22 4c 6f 63 6b 65 64 22 20 6f |ith a."Locked" o| 000003f0 72 20 22 41 6c 72 65 61 64 79 20 65 78 69 73 74 |r "Already exist| 00000400 73 22 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 |s" error message| 00000410 2e 20 48 65 6e 63 65 20 69 74 20 77 6f 75 6c 64 |. Hence it would| 00000420 20 6f 6e 6c 79 20 77 61 73 74 65 20 74 69 6d 65 | only waste time| 00000430 0d 69 6e 20 74 68 65 73 65 20 63 61 73 65 73 20 |.in these cases | 00000440 66 6f 72 20 74 68 65 20 53 61 76 65 20 50 72 6f |for the Save Pro| 00000450 74 65 63 74 69 6f 6e 20 70 72 6f 67 72 61 6d 20 |tection program | 00000460 74 6f 20 61 73 6b 20 77 68 65 74 68 65 72 20 6f |to ask whether o| 00000470 72 20 6e 6f 74 20 74 6f 0d 6f 76 65 72 77 72 69 |r not to.overwri| 00000480 74 65 20 74 68 65 20 66 69 6c 65 2e 0d 20 20 20 |te the file.. | 00000490 20 20 20 20 41 6e 6f 74 68 65 72 20 66 65 61 74 | Another feat| 000004a0 75 72 65 20 6f 66 20 6d 79 20 70 72 6f 67 72 61 |ure of my progra| 000004b0 6d 20 69 73 20 74 68 61 74 20 69 74 20 69 6e 74 |m is that it int| 000004c0 65 72 63 65 70 74 73 20 74 68 65 20 4f 53 46 49 |ercepts the OSFI| 000004d0 4e 44 0d 76 65 63 74 6f 72 2c 20 61 73 20 77 65 |ND.vector, as we| 000004e0 6c 6c 20 61 73 20 74 68 65 20 4f 53 46 49 4c 45 |ll as the OSFILE| 000004f0 20 76 65 63 74 6f 72 2e 20 54 68 69 73 20 6d 65 | vector. This me| 00000500 61 6e 73 20 74 68 61 74 20 69 74 20 63 61 6e 20 |ans that it can | 00000510 70 72 6f 74 65 63 74 0d 61 67 61 69 6e 74 20 4f |protect.againt O| 00000520 50 45 4e 4f 55 54 20 63 6f 6d 6d 61 6e 64 73 20 |PENOUT commands | 00000530 6f 76 65 72 77 72 69 74 69 6e 67 20 65 78 69 73 |overwriting exis| 00000540 74 69 6e 67 20 66 69 6c 65 73 2c 20 61 73 20 77 |ting files, as w| 00000550 65 6c 6c 20 61 73 20 53 41 56 45 20 61 6e 64 0d |ell as SAVE and.| 00000560 2a 53 41 56 45 2e 20 49 20 74 68 6f 75 67 68 74 |*SAVE. I thought| 00000570 20 74 68 61 74 20 74 68 69 73 20 77 6f 75 6c 64 | that this would| 00000580 20 6d 61 6b 65 20 69 74 20 69 6d 70 6f 73 73 69 | make it impossi| 00000590 62 6c 65 20 74 6f 20 75 6e 77 69 74 74 69 6e 67 |ble to unwitting| 000005a0 6c 79 0d 6f 76 65 72 77 72 69 74 65 20 61 20 66 |ly.overwrite a f| 000005b0 69 6c 65 2c 20 62 75 74 20 49 20 77 61 73 20 77 |ile, but I was w| 000005c0 72 6f 6e 67 20 2d 20 69 74 20 77 6f 75 6c 64 20 |rong - it would | 000005d0 73 65 65 6d 20 74 68 61 74 20 74 68 65 20 41 44 |seem that the AD| 000005e0 46 53 20 63 6f 6d 6d 61 6e 64 73 0d 2a 43 4f 50 |FS commands.*COP| 000005f0 59 20 61 6e 64 20 2a 52 45 4e 41 4d 45 20 64 6f |Y and *RENAME do| 00000600 20 6e 6f 74 20 75 73 65 20 4f 53 46 49 4c 45 20 | not use OSFILE | 00000610 6f 72 20 4f 53 46 49 4e 44 2c 20 73 6f 20 74 68 |or OSFIND, so th| 00000620 65 79 20 77 69 6c 6c 20 73 74 69 6c 6c 0d 6f 76 |ey will still.ov| 00000630 65 72 77 72 69 74 65 20 65 78 69 73 74 69 6e 67 |erwrite existing| 00000640 20 66 69 6c 65 73 2e 20 0d 20 20 20 20 20 20 20 | files. . | 00000650 41 66 74 65 72 20 72 65 61 64 69 6e 67 20 52 6f |After reading Ro| 00000660 73 73 20 4c 69 74 74 6c 65 27 73 20 70 72 6f 67 |ss Little's prog| 00000670 72 61 6d 2c 20 49 20 63 6f 70 69 65 64 20 68 69 |ram, I copied hi| 00000680 73 20 69 64 65 61 20 6f 66 20 69 6e 63 6c 75 64 |s idea of includ| 00000690 69 6e 67 0d 61 20 66 61 63 69 6c 69 74 79 20 74 |ing.a facility t| 000006a0 6f 20 64 69 73 61 62 6c 65 20 74 68 65 20 70 72 |o disable the pr| 000006b0 6f 67 72 61 6d 2c 20 61 6e 64 20 69 6e 63 6f 72 |ogram, and incor| 000006c0 70 6f 72 61 74 65 64 20 74 68 69 73 20 69 6e 74 |porated this int| 000006d0 6f 20 6d 79 20 70 72 6f 67 72 61 6d 0d 62 79 20 |o my program.by | 000006e0 69 6e 74 65 72 63 65 70 74 69 6e 67 20 74 68 65 |intercepting the| 000006f0 20 4f 53 43 4c 49 20 76 65 63 74 6f 72 2c 20 61 | OSCLI vector, a| 00000700 6e 64 20 74 65 73 74 6e 67 20 61 6c 6c 20 73 74 |nd testng all st| 00000710 61 72 20 63 6f 6d 6d 61 6e 64 73 2e 20 57 68 65 |ar commands. Whe| 00000720 6e 20 74 68 65 0d 63 6f 6d 6d 61 6e 64 20 2a 44 |n the.command *D| 00000730 49 53 41 42 4c 45 20 69 73 20 65 6e 74 65 72 65 |ISABLE is entere| 00000740 64 2c 20 74 68 65 20 76 65 63 74 6f 72 73 20 61 |d, the vectors a| 00000750 72 65 20 61 6c 6c 20 72 65 73 65 74 20 74 6f 20 |re all reset to | 00000760 74 68 65 69 72 20 6f 72 69 67 69 6e 61 6c 0d 76 |their original.v| 00000770 61 6c 75 65 73 2c 20 73 6f 20 66 69 6c 65 73 20 |alues, so files | 00000780 63 61 6e 20 62 65 20 6f 76 65 72 77 72 69 74 74 |can be overwritt| 00000790 65 6e 20 61 73 20 75 73 75 61 6c 2e 20 49 74 20 |en as usual. It | 000007a0 69 73 20 61 64 76 69 73 61 62 6c 65 20 74 6f 20 |is advisable to | 000007b0 64 6f 20 74 68 69 73 0d 62 65 66 6f 72 65 20 65 |do this.before e| 000007c0 78 65 63 75 74 69 6e 67 20 61 6e 79 20 6d 61 63 |xecuting any mac| 000007d0 68 69 6e 65 20 63 6f 64 65 20 70 72 6f 67 72 61 |hine code progra| 000007e0 6d 2c 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 72 |m, unless you ar| 000007f0 65 20 73 75 72 65 20 69 74 20 77 69 6c 6c 20 6e |e sure it will n| 00000800 6f 74 0d 63 6f 72 72 75 70 74 20 74 68 65 20 53 |ot.corrupt the S| 00000810 61 76 65 20 50 72 6f 74 65 63 74 69 6f 6e 20 70 |ave Protection p| 00000820 72 6f 67 72 61 6d 2e 0d 20 20 20 20 20 20 20 52 |rogram.. R| 00000830 65 6d 65 6d 62 65 72 20 61 6c 73 6f 2c 20 74 68 |emember also, th| 00000840 61 74 20 70 61 67 65 20 26 42 20 77 69 6c 6c 20 |at page &B will | 00000850 62 65 20 63 6f 72 72 75 70 74 65 64 20 62 79 20 |be corrupted by | 00000860 61 6e 79 20 2a 4b 45 59 20 63 6f 6d 6d 61 6e 64 |any *KEY command| 00000870 73 2c 0d 61 6e 64 20 74 68 61 74 20 70 61 67 65 |s,.and that page| 00000880 20 26 43 20 77 69 6c 6c 20 62 65 20 63 6f 72 72 | &C will be corr| 00000890 75 70 74 65 64 20 62 79 20 61 6e 79 20 56 44 55 |upted by any VDU| 000008a0 20 32 33 20 28 63 68 61 72 61 63 74 65 72 20 64 | 23 (character d| 000008b0 65 66 69 6e 69 74 69 6f 6e 29 0d 63 6f 6d 6d 61 |efinition).comma| 000008c0 6e 64 73 2e 20 54 68 69 73 20 61 72 65 61 20 6f |nds. This area o| 000008d0 66 20 6d 65 6d 6f 72 79 20 69 73 20 61 6c 73 6f |f memory is also| 000008e0 20 6c 69 6b 65 6c 79 20 74 6f 20 62 65 20 75 73 | likely to be us| 000008f0 65 64 20 62 79 20 61 6e 79 20 41 44 54 0d 63 6f |ed by any ADT.co| 00000900 6d 6d 61 6e 64 73 20 79 6f 75 20 75 73 65 2c 20 |mmands you use, | 00000910 61 6e 64 20 70 61 67 65 20 39 20 69 73 20 75 73 |and page 9 is us| 00000920 65 64 20 62 79 20 74 68 65 20 45 30 30 20 41 44 |ed by the E00 AD| 00000930 46 53 2e 20 54 6f 20 61 76 6f 69 64 20 61 6c 6c |FS. To avoid all| 00000940 20 74 68 65 73 65 0d 70 69 74 66 61 6c 6c 73 2c | these.pitfalls,| 00000950 20 69 74 20 69 73 20 70 72 6f 62 61 62 6c 79 20 | it is probably | 00000960 62 65 74 74 65 72 20 74 6f 20 72 65 64 75 63 65 |better to reduce| 00000970 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 48 49 | the value of HI| 00000980 4d 45 4d 20 74 6f 20 28 73 61 79 29 0d 26 35 43 |MEM to (say).&5C| 00000990 30 30 20 61 6e 64 20 73 74 6f 72 65 20 74 68 65 |00 and store the| 000009a0 20 63 6f 64 65 20 62 65 74 77 65 65 6e 20 48 49 | code between HI| 000009b0 4d 45 4d 20 61 6e 64 20 73 63 72 65 65 6e 20 6d |MEM and screen m| 000009c0 65 6d 6f 72 79 2e 20 54 68 69 73 20 77 69 6c 6c |emory. This will| 000009d0 20 6b 65 65 70 0d 74 68 65 20 63 6f 64 65 20 73 | keep.the code s| 000009e0 61 66 65 20 75 6e 74 69 6c 20 74 68 65 20 4d 6f |afe until the Mo| 000009f0 64 65 20 69 73 20 6e 65 78 74 20 63 68 61 6e 67 |de is next chang| 00000a00 65 64 2c 20 77 68 69 63 68 20 69 73 20 6e 6f 74 |ed, which is not| 00000a10 20 6f 66 74 65 6e 20 69 66 20 79 6f 75 0d 61 72 | often if you.ar| 00000a20 65 20 74 79 70 69 6e 67 20 69 6e 20 6c 69 73 74 |e typing in list| 00000a30 69 6e 67 73 2c 20 65 74 63 2e 20 54 6f 20 73 74 |ings, etc. To st| 00000a40 6f 72 65 20 74 68 65 20 63 6f 64 65 20 68 65 72 |ore the code her| 00000a50 65 2c 20 79 6f 75 20 6d 75 73 74 20 72 65 6d 65 |e, you must reme| 00000a60 6d 62 65 72 20 74 6f 0d 63 68 61 6e 67 65 20 48 |mber to.change H| 00000a70 49 4d 45 4d 20 62 65 66 6f 72 65 20 61 73 73 65 |IMEM before asse| 00000a80 6d 62 6c 69 6e 67 20 74 68 65 20 73 6f 75 72 63 |mbling the sourc| 00000a90 65 20 63 6f 64 65 20 41 4e 44 20 62 65 66 6f 72 |e code AND befor| 00000aa0 65 20 72 75 6e 6e 69 6e 67 20 74 68 65 20 63 6f |e running the co| 00000ab0 64 65 0d 65 61 63 68 20 74 69 6d 65 20 79 6f 75 |de.each time you| 00000ac0 20 75 73 65 20 69 74 2e 0d 20 20 20 20 20 20 20 | use it.. | 00000ad0 45 76 65 6e 20 62 65 74 74 65 72 20 77 6f 75 6c |Even better woul| 00000ae0 64 20 62 65 20 74 6f 20 73 74 6f 72 65 20 74 68 |d be to store th| 00000af0 65 20 63 6f 64 65 20 70 65 72 6d 61 6e 65 6e 74 |e code permanent| 00000b00 6c 79 20 69 6e 0d 62 61 74 74 65 72 79 2d 62 61 |ly in.battery-ba| 00000b10 63 6b 65 64 20 52 41 4d 2c 20 61 73 20 61 20 73 |cked RAM, as a s| 00000b20 65 72 76 69 63 65 20 52 4f 4d 2e 20 54 68 69 73 |ervice ROM. This| 00000b30 20 77 6f 75 6c 64 20 62 65 20 73 65 74 20 75 70 | would be set up| 00000b40 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 0d 65 | automatically.e| 00000b50 76 65 72 79 20 74 69 6d 65 20 79 6f 75 20 73 77 |very time you sw| 00000b60 69 74 63 68 20 74 68 65 20 6d 61 63 68 69 6e 65 |itch the machine| 00000b70 20 6f 6e 2c 20 61 6e 64 20 77 6f 75 6c 64 20 62 | on, and would b| 00000b80 65 20 61 6c 6d 6f 73 74 20 69 6d 6d 75 6e 65 20 |e almost immune | 00000b90 74 6f 0d 63 6f 72 72 75 70 74 69 6f 6e 20 62 79 |to.corruption by| 00000ba0 20 6f 74 68 65 72 20 70 72 6f 67 72 61 6d 73 2e | other programs.| 00000bb0 20 49 74 20 77 6f 75 6c 64 20 6e 65 65 64 20 74 | It would need t| 00000bc0 6f 20 75 74 69 6c 69 73 65 20 74 68 65 20 65 78 |o utilise the ex| 00000bd0 74 65 6e 64 65 64 20 76 65 63 74 6f 72 0d 73 79 |tended vector.sy| 00000be0 73 74 65 6d 20 28 73 65 65 20 41 64 76 61 6e 63 |stem (see Advanc| 00000bf0 65 64 20 55 73 65 72 20 47 75 69 64 65 2c 20 70 |ed User Guide, p| 00000c00 61 67 65 73 20 31 37 31 20 61 6e 64 20 31 38 39 |ages 171 and 189| 00000c10 29 2e 20 49 20 68 61 76 65 20 74 6f 20 61 64 6d |). I have to adm| 00000c20 69 74 20 74 68 61 74 0d 64 65 73 70 69 74 65 20 |it that.despite | 00000c30 77 72 69 74 69 6e 67 20 74 68 65 20 70 72 6f 67 |writing the prog| 00000c40 72 61 6d 2c 20 49 20 68 61 76 65 20 6e 6f 20 69 |ram, I have no i| 00000c50 6e 74 65 6e 74 69 6f 6e 20 6f 66 20 75 73 69 6e |ntention of usin| 00000c60 67 20 69 74 20 6f 6e 20 61 20 72 65 67 75 6c 61 |g it on a regula| 00000c70 72 0d 62 61 73 69 73 2e 20 49 20 68 61 76 65 20 |r.basis. I have | 00000c80 61 6c 72 65 61 64 79 20 67 6f 74 20 69 6e 74 6f |already got into| 00000c90 20 74 68 65 20 68 61 62 69 74 20 6f 66 20 6c 6f | the habit of lo| 00000ca0 63 6b 69 6e 67 20 61 6c 6c 20 70 72 6f 67 72 61 |cking all progra| 00000cb0 6d 73 0d 74 68 61 74 20 61 72 65 20 6f 66 20 61 |ms.that are of a| 00000cc0 6e 79 20 76 61 6c 75 65 20 77 68 65 6e 20 49 20 |ny value when I | 00000cd0 61 6d 20 6e 6f 74 20 77 6f 72 6b 69 6e 67 20 6f |am not working o| 00000ce0 6e 20 74 68 65 6d 2c 20 61 6e 64 20 69 6e 20 61 |n them, and in a| 00000cf0 6e 79 20 63 61 73 65 2c 20 69 66 20 49 0d 77 61 |ny case, if I.wa| 00000d00 73 20 69 6e 20 61 20 73 75 66 66 69 63 69 65 6e |s in a sufficien| 00000d10 74 6c 79 20 61 62 73 65 6e 74 2d 6d 69 6e 64 65 |tly absent-minde| 00000d20 64 20 6d 6f 6f 64 20 74 6f 20 6f 76 65 72 77 72 |d mood to overwr| 00000d30 69 74 65 20 61 20 66 69 6c 65 20 62 79 20 6d 69 |ite a file by mi| 00000d40 73 74 61 6b 65 2c 0d 49 20 77 6f 75 6c 64 20 70 |stake,.I would p| 00000d50 72 6f 62 61 62 6c 79 20 68 61 76 65 20 66 6f 72 |robably have for| 00000d60 67 6f 74 74 65 6e 20 74 6f 20 6c 6f 61 64 20 74 |gotten to load t| 00000d70 68 65 20 70 72 6f 74 65 63 74 69 6f 6e 20 70 72 |he protection pr| 00000d80 6f 67 72 61 6d 20 61 73 20 77 65 6c 6c 21 0d 48 |ogram as well!.H| 00000d90 6f 77 65 76 65 72 2c 20 69 66 20 74 68 65 20 70 |owever, if the p| 00000da0 72 6f 67 72 61 6d 20 63 6f 75 6c 64 20 62 65 20 |rogram could be | 00000db0 6d 61 64 65 20 74 6f 20 77 6f 72 6b 20 70 65 72 |made to work per| 00000dc0 6d 61 6e 65 6e 74 6c 79 20 69 6e 20 73 69 64 65 |manently in side| 00000dd0 77 61 79 73 20 52 41 4d 2c 0d 69 74 20 77 6f 75 |ways RAM,.it wou| 00000de0 6c 64 20 62 65 20 66 61 72 20 6d 6f 72 65 20 75 |ld be far more u| 00000df0 73 65 66 75 6c 2e 20 49 20 77 69 6c 6c 20 69 6e |seful. I will in| 00000e00 76 65 73 74 69 67 61 74 65 20 74 68 69 73 20 70 |vestigate this p| 00000e10 6f 73 73 69 62 69 6c 69 74 79 0d 66 75 72 74 68 |ossibility.furth| 00000e20 65 72 2e 2e 2e 20 0d 20 20 20 20 20 20 20 4e 6f |er... . No| 00000e30 74 65 20 74 68 61 74 20 77 68 65 6e 20 74 68 65 |te that when the| 00000e40 20 70 72 6f 67 72 61 6d 20 61 73 6b 73 20 77 68 | program asks wh| 00000e50 65 74 68 65 72 20 61 20 66 69 6c 65 20 73 68 6f |ether a file sho| 00000e60 75 6c 64 20 62 65 0d 6f 76 65 72 77 72 69 74 74 |uld be.overwritt| 00000e70 65 6e 2c 20 79 6f 75 20 6d 75 73 74 20 61 6e 73 |en, you must ans| 00000e80 77 65 72 20 77 69 74 68 20 74 68 65 20 77 6f 72 |wer with the wor| 00000e90 64 20 22 59 45 53 22 20 28 75 70 70 65 72 20 6f |d "YES" (upper o| 00000ea0 72 20 6c 6f 77 65 72 20 63 61 73 65 29 20 69 6e |r lower case) in| 00000eb0 0d 66 75 6c 6c 20 2d 20 61 6e 79 20 6f 74 68 65 |.full - any othe| 00000ec0 72 20 6b 65 79 20 77 69 6c 6c 20 67 69 76 65 20 |r key will give | 00000ed0 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67 |the error messag| 00000ee0 65 20 22 41 62 6f 72 74 65 64 22 2e 20 54 68 69 |e "Aborted". Thi| 00000ef0 73 20 69 73 20 74 68 65 0d 73 74 61 6e 64 61 72 |s is the.standar| 00000f00 64 20 70 72 6f 63 65 64 75 72 65 20 75 73 65 64 |d procedure used| 00000f10 20 62 79 20 74 68 65 20 41 44 46 53 20 77 68 65 | by the ADFS whe| 00000f20 6e 20 61 73 6b 69 6e 67 20 66 6f 72 20 63 6f 6e |n asking for con| 00000f30 66 69 72 6d 61 74 69 6f 6e 20 66 6f 72 20 74 68 |firmation for th| 00000f40 65 0d 2a 44 45 53 54 52 4f 59 20 63 6f 6d 6d 61 |e.*DESTROY comma| 00000f50 6e 64 2e 20 52 65 6d 65 6d 62 65 72 20 74 68 61 |nd. Remember tha| 00000f60 74 20 74 68 65 20 22 41 62 6f 72 74 65 64 22 20 |t the "Aborted" | 00000f70 65 72 72 6f 72 20 6d 61 79 20 63 61 75 73 65 20 |error may cause | 00000f80 61 20 42 41 53 49 43 0d 70 72 6f 67 72 61 6d 20 |a BASIC.program | 00000f90 74 6f 20 73 74 6f 70 20 69 66 20 69 74 20 68 61 |to stop if it ha| 00000fa0 73 20 69 6e 61 64 65 71 75 61 74 65 20 65 72 72 |s inadequate err| 00000fb0 6f 72 20 74 72 61 70 70 69 6e 67 2e 20 48 6f 77 |or trapping. How| 00000fc0 65 76 65 72 2c 20 69 74 20 69 73 20 61 6c 77 61 |ever, it is alwa| 00000fd0 79 73 0d 75 6e 77 69 73 65 20 74 6f 20 75 73 65 |ys.unwise to use| 00000fe0 20 74 68 65 20 70 72 6f 74 65 63 74 69 6f 6e 20 | the protection | 00000ff0 70 72 6f 67 72 61 6d 20 66 72 6f 6d 20 69 6e 73 |program from ins| 00001000 69 64 65 20 61 6e 6f 74 68 65 72 20 70 72 6f 67 |ide another prog| 00001010 72 61 6d 2c 20 69 6e 20 63 61 73 65 0d 6f 66 20 |ram, in case.of | 00001020 63 6f 72 72 75 70 74 69 6e 67 20 74 68 65 20 63 |corrupting the c| 00001030 6f 64 65 2c 20 73 6f 20 74 68 69 73 20 73 68 6f |ode, so this sho| 00001040 75 6c 64 20 6e 6f 74 20 62 65 20 61 20 6d 61 6a |uld not be a maj| 00001050 6f 72 20 70 72 6f 62 6c 65 6d 2e 0d 20 20 20 20 |or problem.. | 00001060 20 20 20 41 73 20 77 69 74 68 20 52 6f 73 73 20 | As with Ross | 00001070 4c 69 74 74 6c 65 27 73 20 70 72 6f 67 72 61 6d |Little's program| 00001080 20 49 20 68 61 76 65 20 69 6e 63 6c 75 64 65 64 | I have included| 00001090 20 61 20 63 68 65 63 6b 20 74 6f 20 6d 61 6b 65 | a check to make| 000010a0 20 73 75 72 65 0d 74 68 61 74 20 74 68 65 20 73 | sure.that the s| 000010b0 65 74 75 70 20 72 6f 75 74 69 6e 65 20 69 73 20 |etup routine is | 000010c0 6e 6f 74 20 65 78 65 63 75 74 65 64 20 74 77 69 |not executed twi| 000010d0 63 65 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 77 |ce, though you w| 000010e0 69 6c 6c 20 73 74 69 6c 6c 20 72 75 6e 0d 69 6e |ill still run.in| 000010f0 74 6f 20 74 72 6f 75 62 6c 65 20 69 66 20 79 6f |to trouble if yo| 00001100 75 20 72 75 6e 20 61 20 73 65 63 6f 6e 64 20 63 |u run a second c| 00001110 6f 70 79 20 77 68 69 63 68 20 77 61 73 20 61 73 |opy which was as| 00001120 65 6d 62 6c 65 64 20 61 74 20 61 20 64 69 66 66 |embled at a diff| 00001130 65 72 65 6e 74 0d 61 64 64 72 65 73 73 2e 20 49 |erent.address. I| 00001140 66 20 74 68 65 20 63 6f 64 65 20 62 65 63 6f 6d |f the code becom| 00001150 65 73 20 63 6f 72 72 75 70 74 65 64 20 66 6f 72 |es corrupted for| 00001160 20 61 6e 79 20 72 65 61 73 6f 6e 2c 20 70 72 65 | any reason, pre| 00001170 73 73 20 43 54 52 4c 2d 42 52 45 41 4b 2c 0d 73 |ss CTRL-BREAK,.s| 00001180 61 76 65 20 79 6f 75 72 20 77 6f 72 6b 20 69 66 |ave your work if| 00001190 20 69 74 20 69 73 20 73 74 69 6c 6c 20 69 6e 74 | it is still int| 000011a0 61 63 74 2c 20 74 68 65 6e 20 72 65 2d 69 6e 73 |act, then re-ins| 000011b0 74 61 6c 6c 20 74 68 65 20 70 72 6f 74 65 63 74 |tall the protect| 000011c0 69 6f 6e 0d 70 72 6f 67 72 61 6d 2e 20 52 6f 73 |ion.program. Ros| 000011d0 73 20 4c 69 74 74 6c 65 20 6d 65 6e 74 69 6f 6e |s Little mention| 000011e0 65 64 20 69 6e 20 45 55 47 32 30 20 74 68 61 74 |ed in EUG20 that| 000011f0 20 74 68 69 73 20 66 65 61 74 75 72 65 20 64 69 | this feature di| 00001200 64 20 6e 6f 74 20 77 6f 72 6b 0d 70 72 6f 70 65 |d not work.prope| 00001210 72 6c 79 20 69 6e 20 68 69 73 20 44 46 53 20 76 |rly in his DFS v| 00001220 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 70 72 |ersion of the pr| 00001230 6f 67 72 61 6d 2e 20 54 68 65 20 70 72 6f 62 6c |ogram. The probl| 00001240 65 6d 20 77 61 73 20 74 68 61 74 20 74 68 65 0d |em was that the.| 00001250 63 6f 6e 74 65 6e 74 73 20 6f 66 20 74 68 65 20 |contents of the | 00001260 4f 53 46 49 4c 45 20 76 65 63 74 6f 72 20 77 65 |OSFILE vector we| 00001270 72 65 20 63 6f 70 69 65 64 20 69 6e 74 6f 20 74 |re copied into t| 00001280 68 65 20 22 72 65 74 75 72 6e 22 20 76 65 63 74 |he "return" vect| 00001290 6f 72 20 28 75 73 65 64 0d 74 6f 20 63 61 72 72 |or (used.to carr| 000012a0 79 20 6f 75 74 20 74 68 65 20 4f 53 46 49 4c 45 |y out the OSFILE| 000012b0 20 63 61 6c 6c 20 61 74 20 74 68 65 20 65 6e 64 | call at the end| 000012c0 20 6f 66 20 74 68 65 20 72 6f 75 74 69 6e 65 29 | of the routine)| 000012d0 2c 20 62 65 66 6f 72 65 20 74 68 65 20 63 68 65 |, before the che| 000012e0 63 6b 0d 77 61 73 20 6d 61 64 65 20 74 6f 20 66 |ck.was made to f| 000012f0 69 6e 64 20 6f 75 74 20 69 66 20 74 68 65 20 70 |ind out if the p| 00001300 72 6f 67 72 61 6d 20 68 61 64 20 61 6c 72 65 61 |rogram had alrea| 00001310 64 79 20 62 65 65 6e 20 69 6e 73 74 61 6c 6c 65 |dy been installe| 00001320 64 2e 20 54 68 69 73 20 6d 65 61 6e 73 0d 74 68 |d. This means.th| 00001330 61 74 20 61 66 74 65 72 20 74 68 65 20 70 72 6f |at after the pro| 00001340 67 72 61 6d 20 69 73 20 72 75 6e 20 74 68 65 20 |gram is run the | 00001350 73 65 63 6f 6e 64 20 74 69 6d 65 2c 20 62 6f 74 |second time, bot| 00001360 68 20 74 68 65 20 72 65 61 6c 20 76 65 63 74 6f |h the real vecto| 00001370 72 20 61 6e 64 0d 74 68 65 20 72 65 74 75 72 6e |r and.the return| 00001380 20 76 65 63 74 6f 72 20 70 6f 69 6e 74 20 74 6f | vector point to| 00001390 20 74 68 65 20 73 74 61 72 74 20 6f 66 20 74 68 | the start of th| 000013a0 65 20 50 72 6f 74 65 63 74 69 6f 6e 20 70 72 6f |e Protection pro| 000013b0 67 72 61 6d 2e 20 54 68 69 73 0d 65 78 70 6c 61 |gram. This.expla| 000013c0 69 6e 73 20 77 68 79 20 69 74 20 65 6e 74 65 72 |ins why it enter| 000013d0 73 20 61 6e 20 65 6e 64 6c 65 73 73 20 6c 6f 6f |s an endless loo| 000013e0 70 20 77 68 65 6e 20 72 75 6e 2e 20 54 68 65 20 |p when run. The | 000013f0 73 6f 6c 75 74 69 6f 6e 20 6f 66 20 63 6f 75 72 |solution of cour| 00001400 73 65 2c 0d 69 73 20 74 6f 20 73 77 61 70 20 61 |se,.is to swap a| 00001410 72 6f 75 6e 64 20 74 68 65 20 66 69 72 73 74 20 |round the first | 00001420 66 65 77 20 6c 69 6e 65 73 20 6f 66 20 74 68 65 |few lines of the| 00001430 20 63 6f 64 65 2c 20 73 6f 20 74 68 65 20 63 68 | code, so the ch| 00001440 65 63 6b 20 69 73 20 6d 61 64 65 0d 62 65 66 6f |eck is made.befo| 00001450 72 65 20 61 6e 79 20 63 68 61 6e 67 65 73 20 61 |re any changes a| 00001460 72 65 20 6d 61 64 65 3a 0d 20 20 20 20 20 20 20 |re made:. | 00001470 20 20 20 20 20 20 20 20 31 36 30 2e 69 6e 69 74 | 160.init| 00001480 20 20 4c 44 41 66 69 6c 65 76 2b 31 0d 20 20 20 | LDAfilev+1. | 00001490 20 20 20 20 20 20 20 20 20 20 20 20 31 37 30 20 | 170 | 000014a0 20 20 20 20 20 20 43 4d 50 23 6e 65 77 76 20 44 | CMP#newv D| 000014b0 49 56 20 32 35 36 0d 20 20 20 20 20 20 20 20 20 |IV 256. | 000014c0 20 20 20 20 20 20 31 38 30 20 20 20 20 20 20 20 | 180 | 000014d0 42 45 51 65 6e 64 20 20 0d 20 20 20 20 20 20 20 |BEQend . | 000014e0 20 20 20 20 20 20 20 20 31 39 30 20 20 20 20 20 | 190 | 000014f0 20 20 53 54 41 72 65 74 76 2b 31 0d 20 20 20 20 | STAretv+1. | 00001500 20 20 20 20 20 20 20 20 20 20 20 32 30 30 20 20 | 200 | 00001510 20 20 20 20 20 4c 44 41 66 69 6c 65 76 0d 20 20 | LDAfilev. | 00001520 20 20 20 20 20 20 20 20 20 20 20 20 20 32 31 30 | 210| 00001530 20 20 20 20 20 20 20 53 54 41 72 65 74 76 0d 20 | STAretv. | 00001540 20 20 20 20 20 20 20 20 20 20 20 20 65 74 63 2e | etc.| 00001550 2e 2e 2e 0d 20 20 20 20 20 20 20 48 6f 77 65 76 |.... Howev| 00001560 65 72 2c 20 74 68 69 73 20 69 73 20 6e 6f 74 20 |er, this is not | 00001570 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 73 |the end of the s| 00001580 74 6f 72 79 2c 20 62 65 63 61 75 73 65 20 69 66 |tory, because if| 00001590 20 74 68 65 20 53 41 46 45 0d 70 72 6f 67 72 61 | the SAFE.progra| 000015a0 6d 20 68 61 73 20 62 65 65 6e 20 72 75 6e 20 61 |m has been run a| 000015b0 20 73 65 63 6f 6e 64 20 74 69 6d 65 20 75 73 69 | second time usi| 000015c0 6e 67 20 2a 53 41 46 45 20 28 61 73 20 6f 70 70 |ng *SAFE (as opp| 000015d0 6f 73 65 64 20 74 6f 20 43 41 4c 4c 26 39 30 30 |osed to CALL&900| 000015e0 29 2c 0d 74 68 65 20 72 65 74 75 72 6e 20 76 65 |),.the return ve| 000015f0 63 74 6f 72 73 20 77 69 6c 6c 20 68 61 76 65 20 |ctors will have | 00001600 62 65 65 6e 20 6f 76 65 72 77 72 69 74 74 65 6e |been overwritten| 00001610 20 77 69 74 68 20 7a 65 72 6f 73 2c 20 61 6e 64 | with zeros, and| 00001620 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 0d 63 6f | the original.co| 00001630 6e 74 65 6e 74 73 20 6f 66 20 74 68 65 20 76 65 |ntents of the ve| 00001640 63 74 6f 72 73 20 6c 6f 73 74 2e 20 54 68 65 79 |ctors lost. They| 00001650 20 63 61 6e 6e 6f 74 20 62 65 20 72 65 73 74 6f | cannot be resto| 00001660 72 65 64 20 75 73 69 6e 67 20 74 68 65 20 64 65 |red using the de| 00001670 66 61 75 6c 74 0d 76 65 63 74 6f 72 20 74 61 62 |fault.vector tab| 00001680 6c 65 20 69 6e 20 74 68 65 20 4f 53 20 52 4f 4d |le in the OS ROM| 00001690 2c 20 73 69 6e 63 65 20 74 68 69 73 20 77 69 6c |, since this wil| 000016a0 6c 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 74 |l point to the t| 000016b0 61 70 65 20 66 69 6c 69 6e 67 0d 73 79 73 74 65 |ape filing.syste| 000016c0 6d 2e 20 54 68 65 20 73 6f 6c 75 74 69 6f 6e 20 |m. The solution | 000016d0 68 65 72 65 20 69 73 20 74 6f 20 70 75 74 20 74 |here is to put t| 000016e0 68 65 20 72 65 74 75 72 6e 20 76 65 63 74 6f 72 |he return vector| 000016f0 73 20 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 |s at the end of | 00001700 74 68 65 0d 70 72 6f 67 72 61 6d 2c 20 61 6e 64 |the.program, and| 00001710 20 6e 6f 74 20 74 6f 20 69 6e 63 6c 75 64 65 20 | not to include | 00001720 74 68 65 6d 20 69 6e 20 74 68 65 20 73 61 76 65 |them in the save| 00001730 64 20 66 69 6c 65 2e 20 54 68 69 73 20 6d 65 61 |d file. This mea| 00001740 6e 73 20 74 68 61 74 20 74 68 65 79 0d 77 69 6c |ns that they.wil| 00001750 6c 20 6e 6f 74 20 62 65 20 6f 76 65 72 77 72 69 |l not be overwri| 00001760 74 74 65 6e 20 77 68 65 6e 20 74 68 65 20 53 41 |tten when the SA| 00001770 46 45 20 70 72 6f 67 72 61 6d 20 69 73 20 72 65 |FE program is re| 00001780 2d 6c 6f 61 64 65 64 2e 20 54 68 69 73 20 69 73 |-loaded. This is| 00001790 20 68 6f 77 20 49 0d 61 76 6f 69 64 65 64 20 74 | how I.avoided t| 000017a0 68 65 20 70 72 6f 62 6c 65 6d 20 69 6e 20 6d 79 |he problem in my| 000017b0 20 70 72 6f 67 72 61 6d 2e 0d 20 20 20 20 20 20 | program.. | 000017c0 20 4d 79 20 70 72 6f 67 72 61 6d 20 69 73 20 64 | My program is d| 000017d0 65 73 69 67 6e 65 64 20 74 6f 20 77 6f 72 6b 20 |esigned to work | 000017e0 6f 6e 20 62 6f 74 68 20 41 44 46 53 20 61 6e 64 |on both ADFS and| 000017f0 20 44 46 53 2c 20 73 69 6e 63 65 20 69 74 20 6f | DFS, since it o| 00001800 6e 6c 79 0d 75 73 65 73 20 22 6c 65 67 61 6c 22 |nly.uses "legal"| 00001810 20 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65 | operating syste| 00001820 6d 20 63 61 6c 6c 73 2c 20 77 68 69 63 68 20 61 |m calls, which a| 00001830 72 65 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 |re common to bot| 00001840 68 2e 20 48 6f 77 65 76 65 72 2c 20 49 0d 64 6f |h. However, I.do| 00001850 20 6e 6f 74 20 68 61 76 65 20 61 20 44 46 53 20 | not have a DFS | 00001860 52 4f 4d 20 74 6f 20 74 65 73 74 20 74 68 69 73 |ROM to test this| 00001870 2c 20 73 6f 20 49 20 77 6f 75 6c 64 20 62 65 20 |, so I would be | 00001880 69 6e 74 65 72 65 73 74 65 64 20 74 6f 20 68 65 |interested to he| 00001890 61 72 20 69 66 20 69 74 0d 69 73 20 6e 6f 74 20 |ar if it.is not | 000018a0 63 6f 6d 70 61 74 69 62 6c 65 2c 20 6f 72 20 69 |compatible, or i| 000018b0 66 20 74 68 65 72 65 20 61 72 65 20 61 6e 79 20 |f there are any | 000018c0 62 75 67 73 2e 0d 20 20 20 20 20 20 20 20 20 20 |bugs.. | 000018d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000018f0 20 20 20 20 20 20 20 20 4d 61 74 74 68 65 77 20 | Matthew | 00001900 46 6f 72 64 0d |Ford.| 00001905
.