Home » Personal collection » Acorn ADFS disks » Electron » Cheat_finder.ADF » Check3

Check3

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 » Cheat_finder.ADF
Filename: Check3
Read OK:
File size: 101F bytes
Load address: FFFF1D00
Exec address: FFFF8023
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10 REM Save Protection
   20 REM by M. Ford, for EUG, July 1995
   30 PRINT"Enter address to assemble code at"'"(Default &A00): &";
   40 INPUT""hex$
   50 IF hex$="" THEN code=&A00 ELSE code=EVAL("&"+hex$)
   60 IF code<0 OR code>&8000 THEN PRINT"Adress not valid - try again.":GOTO30
   70 osbyte=&FFF4
   80 osasci=&FFE3
   90 osnewl=&FFE7
  100 filev=&212
  110 findv=&21C
  120 cliv=&208
  130 FOR pass=0 TO 2 STEP 2
  140 P%=code
  150 [OPTpass
  160 LDAfilev+1
  170 CMP#(start DIV256)
  180 BNEinstall
  190 BRK
  200 EQUB0
  210 EQUS"PROTECT already installed"
  220 BRK
  230 .install
  240 SEI
  250 LDAfilev
  260 STAoldvec
  270 LDAfilev+1
  280 STAoldvec+1
  290 LDA#start MOD256
  300 STAfilev
  310 LDA#start DIV256
  320 STAfilev+1
  330 LDAfindv
  340 STAoldfvec
  350 LDAfindv+1
  360 STAoldfvec+1
  370 LDA#openout MOD256
  380 STAfindv
  390 LDA#openout DIV256
  400 STAfindv+1
  410 LDAcliv
  420 STAoldcliv
  430 LDAcliv+1
  440 STAoldcliv+1
  450 LDA#cli MOD256
  460 STAcliv
  470 LDA#cli DIV256
  480 STAcliv+1
  490 CLI
  500 LDX#intro MOD256
  510 LDY#intro DIV256
  520 JSRtext
  530 RTS
  540 .openout \OSFIND entry point
  550 CMP#&80  \code for OPENOUT operation
  560 BEQfcheck
  570 JMP(oldfvec)
  580 .fcheck
  590 PHA
  600 LDA#1
  610 STAflag
  620 STXblock   \X and Y hold filename
  630 STYblock+1 \address.
  640 JMPread
  650 .start \OSFILE entry point
  660 CMP#0
  670 BEQcheck \"Save section of memory" operation
  680 CMP#7
  690 BEQcheck \"Create file and pad with zeros" operation
  700 JMPreturn
  710 .check
  720 PHA
  730 STXadd+1 \X and Y hold address of
  740 STYadd+2 \parameter block.
  750 LDX#0
  760 JSRadd
  770 STAblock \Low byte of filename address
  780 INX
  790 JSRadd
  800 STAblock+1 \High byte of filename address
  810 .read
  820 LDX#(block MOD256)
  830 LDY#(block DIV256)
  840 LDA#5
  850 JSRreturn \read calalogue entry into memory at "block"
  860 CMP#1
  870 BNEok \exit if file does not exist, or is a directory
  880 LDAblock+&E
  890 AND#8
  900 BNEok \exit if file is locked
  910 LDX#exists MOD256
  920 LDY#exists DIV256
  930 JSRtext
  940 LDA#0
  950 STAkeyno
  960 .waitloop
  970 LDX#0
  980 LDY#1
  990 LDA#&81
 1000 JSRosbyte
 1010 BCCkey \Key pressed (not Escape)
 1020 CPY#&1B \Code for Escape key
 1030 BNEwaitloop
 1040 .no
 1050 JSRosnewl
 1060 LDXadd+1
 1070 LDYadd+2
 1080 PLA
 1090 BRK
 1100 EQUB&92
 1110 EQUS"Aborted"
 1120 BRK
 1130 .key
 1140 TXA
 1150 JSRosasci
 1160 LDXkeyno
 1170 CMPyes1,X
 1180 BEQy
 1190 CMPyes2,X
 1200 BNEno
 1210 .y
 1220 INX
 1230 STXkeyno
 1240 CPX#4
 1250 BNEwaitloop
 1260 .ok
 1270 LDAflag
 1280 BNEfindend
 1290 LDXadd+1
 1300 LDYadd+2
 1310 PLA
 1320 .return \exit from OSFILE
 1330 JMP(oldvec)
 1340 .findend \exit from OSFIND
 1350 LDA#0
 1360 STAflag
 1370 LDXblock
 1380 LDYblock+1
 1390 PLA
 1400 JMP(oldfvec)
 1410 .add
 1420 LDA&FFFF,X
 1430 RTS
 1440 .text
 1450 JSRosnewl
 1460 STXloop+1
 1470 STYloop+2
 1480 LDX#0
 1490 .loop
 1500 LDAtext,X
 1510 JSRosasci
 1520 INX
 1530 CMP#0
 1540 BNEloop
 1550 RTS
 1560 .cli
 1570 STXadd+1
 1580 STYadd+2
 1590 LDX#&FF
 1600 .starloop
 1610 INX
 1620 JSRadd
 1630 CMP#42 \ASCII code for "*"
 1640 BEQstarloop
 1650 LDY#0
 1660 .comploop
 1670 JSRadd
 1680 CMPdisable1,Y
 1690 BEQinc
 1700 CMPdisable2,Y
 1710 BNEout
 1720 .inc
 1730 CMP#13
 1740 BEQdis
 1750 INX
 1760 INY
 1770 JMPcomploop
 1780 .dis
 1790 PHP
 1800 SEI
 1810 LDAoldvec
 1820 STAfilev
 1830 LDAoldvec+1
 1840 STAfilev+1
 1850 LDAoldfvec
 1860 STAfindv
 1870 LDAoldfvec+1
 1880 STAfindv+1
 1890 LDAoldcliv
 1900 STAcliv
 1910 LDAoldcliv+1
 1920 STAcliv+1
 1930 CLI
 1940 LDX#dismess MOD256
 1950 LDY#dismess DIV256
 1960 JSRtext
 1970 PLP
 1980 RTS
 1990 .out
 2000 LDXadd+1
 2010 LDYadd+2
 2020 JMP(oldcliv)
 2030 .exists EQUS"File exists - Overwrite old file?":EQUB0
 2040 .intro EQUS"PROTECT utility installed. You will now be asked to confirm (or abort) any file operation which involves overwriting    an existing file."
 2050 EQUB13:EQUS"Type *DISABLE to disable the utility.":EQUB13:EQUB0
 2060 .dismess EQUS"PROTECT utility disabled.":EQUB13:EQUB0
 2070 .disable1 EQUS"DISABLE":EQUB13
 2080 .disable2 EQUS"disable":EQUB13
 2090 .yes1 EQUS"YES":EQUB13
 2100 .yes2 EQUS"yes":EQUB13
 2110 .codeend \Only save up to here, to avoid corrupting the return addresses if the code is run a second time.
 2120 .oldvec EQUW0
 2130 .oldfvec EQUW0
 2140 .oldcliv EQUW0
 2150 .flag EQUB0
 2160 .keyno EQUB0
 2170 .block
 2180 ]:NEXT pass
 2190 PRINT
 2200 INPUT"Filename for code",filename$
 2210 OSCLI"SAVE "+filename$+" "+STR$~code+" "+STR$~codeend
 2220 PRINT'"Type *";filename$;" to intall the save"'"protection program."

 � Save Protection
% � by M. Ford, for EUG, July 1995
> �"Enter address to assemble code at"'"(Default &A00): &";
( �""hex$
2- � hex$="" � code=&A00 � code=�("&"+hex$)
<C � code<0 � code>&8000 � �"Adress not valid - try again.":�T^@
F osbyte=&FFF4
P osasci=&FFE3
Z osnewl=&FFE7
d filev=&212
n findv=&21C
x cliv=&208
� � pass=0 � 2 � 2
� P%=code
�
 [OPTpass
� LDAfilev+1
� CMP#(start �256)
� BNEinstall
� BRK
�
 EQUB0
�$ EQUS"PROTECT already installed"
� BRK
�
 .install
� SEI
�
 LDAfilev
 STAoldvec
 LDAfilev+1
 STAoldvec+1
" LDA#start �256
,
 STAfilev
6 LDA#start �256
@ STAfilev+1
J
 LDAfindv
T STAoldfvec
^ LDAfindv+1
h STAoldfvec+1
r LDA#openout �256
|
 STAfindv
� LDA#openout �256
� STAfindv+1
� LDAcliv
� STAoldcliv
� LDAcliv+1
� STAoldcliv+1
� LDA#cli �256
� STAcliv
� LDA#cli �256
� STAcliv+1
� CLI
� LDX#intro �256
� LDY#intro �256
 JSRtext
 RTS
! .openout \OSFIND entry point
&# CMP#&80  \code for � operation
0 BEQfcheck
: JMP(oldfvec)
D .fcheck
N PHA
X
 LDA#1
b STAflag
l& STXblock   \X and Y hold filename
v STYblock+1 \address.
� JMPread
� .start \OSFILE entry point
�
 CMP#0
�1 BEQcheck \"Save section of memory" operation
�
 CMP#7
�9 BEQcheck \"Create file and pad with zeros" operation
� JMPreturn
� .check
� PHA
�& STXadd+1 \X and Y hold address of
� STYadd+2 \parameter block.
�
 LDX#0
� JSRadd
+ STAblock \Low byte of filename address
 INX
 JSRadd
 . STAblock+1 \High byte of filename address
*
 .read
4 LDX#(block �256)
> LDY#(block �256)
H
 LDA#5
R; JSRreturn \read calalogue entry into memory at "block"
\
 CMP#1
f: BNEok \exit if file does not exist, or is a directory
p LDAblock+&E
z �#8
�" BNEok \exit if file is locked
� LDX#exists �256
� LDY#exists �256
� JSRtext
�
 LDA#0
�
 STAkeyno
� .waitloop
�
 LDX#0
�
 LDY#1
� LDA#&81
� JSRosbyte
�% BCCkey \Key pressed (not Escape)
�! CPY#&1B \Code for Escape key
 BNEwaitloop
 .no
 JSRosnewl
$
 LDXadd+1
.
 LDYadd+2
8 PLA
B BRK
L EQUB&92
V EQUS"Aborted"
` BRK
j	 .key
t TXA
~ JSRosasci
�
 LDXkeyno
� CMPyes1,X
�	 BEQy
� CMPyes2,X
�
 BNEno
� .y
� INX
�
 STXkeyno
�
 CPX#4
� BNEwaitloop
� .ok
� LDAflag
 BNEfindend


 LDXadd+1

 LDYadd+2
 PLA
( .return \exit from OSFILE
2 JMP(oldvec)
< .findend \exit from OSFIND
F
 LDA#0
P STAflag
Z
 LDXblock
d LDYblock+1
n PLA
x JMP(oldfvec)
�	 .add
� LDA&FFFF,X
� RTS
�
 .text
� JSRosnewl
� STXloop+1
� STYloop+2
�
 LDX#0
�
 .loop
� LDAtext,X
� JSRosasci
� INX
�
 CMP#0
 BNEloop
 RTS
	 .cli
"
 STXadd+1
,
 STYadd+2
6 LDX#&FF
@ .starloop
J INX
T JSRadd
^ CMP#42 \�II code for "*"
h BEQstarloop
r
 LDY#0
| .comploop
� JSRadd
� CMPdisable1,Y
� BEQinc
� CMPdisable2,Y
� BNEout
�	 .inc
� CMP#13
� BEQdis
� INX
� INY
� JMPcomploop
�	 .dis
� PHP
 SEI
 LDAoldvec

 STAfilev
& LDAoldvec+1
0 STAfilev+1
: LDAoldfvec
D
 STAfindv
N LDAoldfvec+1
X STAfindv+1
b LDAoldcliv
l STAcliv
v LDAoldcliv+1
� STAcliv+1
� CLI
� LDX#dismess �256
� LDY#dismess �256
� JSRtext
� PLP
� RTS
�	 .out
�
 LDXadd+1
�
 LDYadd+2
� JMP(oldcliv)
�: .exists EQUS"File exists - Overwrite old file?":EQUB0
�� .intro EQUS"PROTECT utility installed. You will now be asked to confirm (or abort) any file operation which involves overwriting    an existing file."
D EQUB13:EQUS"Type *DISABLE to disable the utility.":EQUB13:EQUB0
: .dismess EQUS"PROTECT utility disabled.":EQUB13:EQUB0
# .disable1 EQUS"DISABLE":EQUB13
 # .disable2 EQUS"disable":EQUB13
* .yes1 EQUS"YES":EQUB13
4 .yes2 EQUS"yes":EQUB13
>o .codeend \Only save up to here, to avoid corrupting the return addresses if the code is run a second time.
H .oldvec EQUW0
R .oldfvec EQUW0
\ .oldcliv EQUW0
f .flag EQUB0
p .keyno EQUB0
z .block
�
 ]:� pass
� �
�# �"Filename for code",filename$
�0 �"SAVE "+filename$+" "+�~code+" "+�~codeend
�E �'"Type *";filename$;" to intall the save"'"protection program."
�
00000000  0d 00 0a 16 20 f4 20 53  61 76 65 20 50 72 6f 74  |.... . Save Prot|
00000010  65 63 74 69 6f 6e 0d 00  14 25 20 f4 20 62 79 20  |ection...% . by |
00000020  4d 2e 20 46 6f 72 64 2c  20 66 6f 72 20 45 55 47  |M. Ford, for EUG|
00000030  2c 20 4a 75 6c 79 20 31  39 39 35 0d 00 1e 3e 20  |, July 1995...> |
00000040  f1 22 45 6e 74 65 72 20  61 64 64 72 65 73 73 20  |."Enter address |
00000050  74 6f 20 61 73 73 65 6d  62 6c 65 20 63 6f 64 65  |to assemble code|
00000060  20 61 74 22 27 22 28 44  65 66 61 75 6c 74 20 26  | at"'"(Default &|
00000070  41 30 30 29 3a 20 26 22  3b 0d 00 28 0c 20 e8 22  |A00): &";..(. ."|
00000080  22 68 65 78 24 0d 00 32  2d 20 e7 20 68 65 78 24  |"hex$..2- . hex$|
00000090  3d 22 22 20 8c 20 63 6f  64 65 3d 26 41 30 30 20  |="" . code=&A00 |
000000a0  8b 20 63 6f 64 65 3d a0  28 22 26 22 2b 68 65 78  |. code=.("&"+hex|
000000b0  24 29 0d 00 3c 43 20 e7  20 63 6f 64 65 3c 30 20  |$)..<C . code<0 |
000000c0  84 20 63 6f 64 65 3e 26  38 30 30 30 20 8c 20 f1  |. code>&8000 . .|
000000d0  22 41 64 72 65 73 73 20  6e 6f 74 20 76 61 6c 69  |"Adress not vali|
000000e0  64 20 2d 20 74 72 79 20  61 67 61 69 6e 2e 22 3a  |d - try again.":|
000000f0  e5 8d 54 5e 40 0d 00 46  11 20 6f 73 62 79 74 65  |..T^@..F. osbyte|
00000100  3d 26 46 46 46 34 0d 00  50 11 20 6f 73 61 73 63  |=&FFF4..P. osasc|
00000110  69 3d 26 46 46 45 33 0d  00 5a 11 20 6f 73 6e 65  |i=&FFE3..Z. osne|
00000120  77 6c 3d 26 46 46 45 37  0d 00 64 0f 20 66 69 6c  |wl=&FFE7..d. fil|
00000130  65 76 3d 26 32 31 32 0d  00 6e 0f 20 66 69 6e 64  |ev=&212..n. find|
00000140  76 3d 26 32 31 43 0d 00  78 0e 20 63 6c 69 76 3d  |v=&21C..x. cliv=|
00000150  26 32 30 38 0d 00 82 15  20 e3 20 70 61 73 73 3d  |&208.... . pass=|
00000160  30 20 b8 20 32 20 88 20  32 0d 00 8c 0c 20 50 25  |0 . 2 . 2.... P%|
00000170  3d 63 6f 64 65 0d 00 96  0d 20 5b 4f 50 54 70 61  |=code.... [OPTpa|
00000180  73 73 0d 00 a0 0f 20 4c  44 41 66 69 6c 65 76 2b  |ss.... LDAfilev+|
00000190  31 0d 00 aa 15 20 43 4d  50 23 28 73 74 61 72 74  |1.... CMP#(start|
000001a0  20 81 32 35 36 29 0d 00  b4 0f 20 42 4e 45 69 6e  | .256).... BNEin|
000001b0  73 74 61 6c 6c 0d 00 be  08 20 42 52 4b 0d 00 c8  |stall.... BRK...|
000001c0  0a 20 45 51 55 42 30 0d  00 d2 24 20 45 51 55 53  |. EQUB0...$ EQUS|
000001d0  22 50 52 4f 54 45 43 54  20 61 6c 72 65 61 64 79  |"PROTECT already|
000001e0  20 69 6e 73 74 61 6c 6c  65 64 22 0d 00 dc 08 20  | installed".... |
000001f0  42 52 4b 0d 00 e6 0d 20  2e 69 6e 73 74 61 6c 6c  |BRK.... .install|
00000200  0d 00 f0 08 20 53 45 49  0d 00 fa 0d 20 4c 44 41  |.... SEI.... LDA|
00000210  66 69 6c 65 76 0d 01 04  0e 20 53 54 41 6f 6c 64  |filev.... STAold|
00000220  76 65 63 0d 01 0e 0f 20  4c 44 41 66 69 6c 65 76  |vec.... LDAfilev|
00000230  2b 31 0d 01 18 10 20 53  54 41 6f 6c 64 76 65 63  |+1.... STAoldvec|
00000240  2b 31 0d 01 22 13 20 4c  44 41 23 73 74 61 72 74  |+1..". LDA#start|
00000250  20 83 32 35 36 0d 01 2c  0d 20 53 54 41 66 69 6c  | .256..,. STAfil|
00000260  65 76 0d 01 36 13 20 4c  44 41 23 73 74 61 72 74  |ev..6. LDA#start|
00000270  20 81 32 35 36 0d 01 40  0f 20 53 54 41 66 69 6c  | .256..@. STAfil|
00000280  65 76 2b 31 0d 01 4a 0d  20 4c 44 41 66 69 6e 64  |ev+1..J. LDAfind|
00000290  76 0d 01 54 0f 20 53 54  41 6f 6c 64 66 76 65 63  |v..T. STAoldfvec|
000002a0  0d 01 5e 0f 20 4c 44 41  66 69 6e 64 76 2b 31 0d  |..^. LDAfindv+1.|
000002b0  01 68 11 20 53 54 41 6f  6c 64 66 76 65 63 2b 31  |.h. STAoldfvec+1|
000002c0  0d 01 72 15 20 4c 44 41  23 6f 70 65 6e 6f 75 74  |..r. LDA#openout|
000002d0  20 83 32 35 36 0d 01 7c  0d 20 53 54 41 66 69 6e  | .256..|. STAfin|
000002e0  64 76 0d 01 86 15 20 4c  44 41 23 6f 70 65 6e 6f  |dv.... LDA#openo|
000002f0  75 74 20 81 32 35 36 0d  01 90 0f 20 53 54 41 66  |ut .256.... STAf|
00000300  69 6e 64 76 2b 31 0d 01  9a 0c 20 4c 44 41 63 6c  |indv+1.... LDAcl|
00000310  69 76 0d 01 a4 0f 20 53  54 41 6f 6c 64 63 6c 69  |iv.... STAoldcli|
00000320  76 0d 01 ae 0e 20 4c 44  41 63 6c 69 76 2b 31 0d  |v.... LDAcliv+1.|
00000330  01 b8 11 20 53 54 41 6f  6c 64 63 6c 69 76 2b 31  |... STAoldcliv+1|
00000340  0d 01 c2 11 20 4c 44 41  23 63 6c 69 20 83 32 35  |.... LDA#cli .25|
00000350  36 0d 01 cc 0c 20 53 54  41 63 6c 69 76 0d 01 d6  |6.... STAcliv...|
00000360  11 20 4c 44 41 23 63 6c  69 20 81 32 35 36 0d 01  |. LDA#cli .256..|
00000370  e0 0e 20 53 54 41 63 6c  69 76 2b 31 0d 01 ea 08  |.. STAcliv+1....|
00000380  20 43 4c 49 0d 01 f4 13  20 4c 44 58 23 69 6e 74  | CLI.... LDX#int|
00000390  72 6f 20 83 32 35 36 0d  01 fe 13 20 4c 44 59 23  |ro .256.... LDY#|
000003a0  69 6e 74 72 6f 20 81 32  35 36 0d 02 08 0c 20 4a  |intro .256.... J|
000003b0  53 52 74 65 78 74 0d 02  12 08 20 52 54 53 0d 02  |SRtext.... RTS..|
000003c0  1c 21 20 2e 6f 70 65 6e  6f 75 74 20 5c 4f 53 46  |.! .openout \OSF|
000003d0  49 4e 44 20 65 6e 74 72  79 20 70 6f 69 6e 74 0d  |IND entry point.|
000003e0  02 26 23 20 43 4d 50 23  26 38 30 20 20 5c 63 6f  |.&# CMP#&80  \co|
000003f0  64 65 20 66 6f 72 20 ae  20 6f 70 65 72 61 74 69  |de for . operati|
00000400  6f 6e 0d 02 30 0e 20 42  45 51 66 63 68 65 63 6b  |on..0. BEQfcheck|
00000410  0d 02 3a 11 20 4a 4d 50  28 6f 6c 64 66 76 65 63  |..:. JMP(oldfvec|
00000420  29 0d 02 44 0c 20 2e 66  63 68 65 63 6b 0d 02 4e  |)..D. .fcheck..N|
00000430  08 20 50 48 41 0d 02 58  0a 20 4c 44 41 23 31 0d  |. PHA..X. LDA#1.|
00000440  02 62 0c 20 53 54 41 66  6c 61 67 0d 02 6c 26 20  |.b. STAflag..l& |
00000450  53 54 58 62 6c 6f 63 6b  20 20 20 5c 58 20 61 6e  |STXblock   \X an|
00000460  64 20 59 20 68 6f 6c 64  20 66 69 6c 65 6e 61 6d  |d Y hold filenam|
00000470  65 0d 02 76 19 20 53 54  59 62 6c 6f 63 6b 2b 31  |e..v. STYblock+1|
00000480  20 5c 61 64 64 72 65 73  73 2e 0d 02 80 0c 20 4a  | \address..... J|
00000490  4d 50 72 65 61 64 0d 02  8a 1f 20 2e 73 74 61 72  |MPread.... .star|
000004a0  74 20 5c 4f 53 46 49 4c  45 20 65 6e 74 72 79 20  |t \OSFILE entry |
000004b0  70 6f 69 6e 74 0d 02 94  0a 20 43 4d 50 23 30 0d  |point.... CMP#0.|
000004c0  02 9e 31 20 42 45 51 63  68 65 63 6b 20 5c 22 53  |..1 BEQcheck \"S|
000004d0  61 76 65 20 73 65 63 74  69 6f 6e 20 6f 66 20 6d  |ave section of m|
000004e0  65 6d 6f 72 79 22 20 6f  70 65 72 61 74 69 6f 6e  |emory" operation|
000004f0  0d 02 a8 0a 20 43 4d 50  23 37 0d 02 b2 39 20 42  |.... CMP#7...9 B|
00000500  45 51 63 68 65 63 6b 20  5c 22 43 72 65 61 74 65  |EQcheck \"Create|
00000510  20 66 69 6c 65 20 61 6e  64 20 70 61 64 20 77 69  | file and pad wi|
00000520  74 68 20 7a 65 72 6f 73  22 20 6f 70 65 72 61 74  |th zeros" operat|
00000530  69 6f 6e 0d 02 bc 0e 20  4a 4d 50 72 65 74 75 72  |ion.... JMPretur|
00000540  6e 0d 02 c6 0b 20 2e 63  68 65 63 6b 0d 02 d0 08  |n.... .check....|
00000550  20 50 48 41 0d 02 da 26  20 53 54 58 61 64 64 2b  | PHA...& STXadd+|
00000560  31 20 5c 58 20 61 6e 64  20 59 20 68 6f 6c 64 20  |1 \X and Y hold |
00000570  61 64 64 72 65 73 73 20  6f 66 0d 02 e4 1f 20 53  |address of.... S|
00000580  54 59 61 64 64 2b 32 20  5c 70 61 72 61 6d 65 74  |TYadd+2 \paramet|
00000590  65 72 20 62 6c 6f 63 6b  2e 0d 02 ee 0a 20 4c 44  |er block..... LD|
000005a0  58 23 30 0d 02 f8 0b 20  4a 53 52 61 64 64 0d 03  |X#0.... JSRadd..|
000005b0  02 2b 20 53 54 41 62 6c  6f 63 6b 20 5c 4c 6f 77  |.+ STAblock \Low|
000005c0  20 62 79 74 65 20 6f 66  20 66 69 6c 65 6e 61 6d  | byte of filenam|
000005d0  65 20 61 64 64 72 65 73  73 0d 03 0c 08 20 49 4e  |e address.... IN|
000005e0  58 0d 03 16 0b 20 4a 53  52 61 64 64 0d 03 20 2e  |X.... JSRadd.. .|
000005f0  20 53 54 41 62 6c 6f 63  6b 2b 31 20 5c 48 69 67  | STAblock+1 \Hig|
00000600  68 20 62 79 74 65 20 6f  66 20 66 69 6c 65 6e 61  |h byte of filena|
00000610  6d 65 20 61 64 64 72 65  73 73 0d 03 2a 0a 20 2e  |me address..*. .|
00000620  72 65 61 64 0d 03 34 15  20 4c 44 58 23 28 62 6c  |read..4. LDX#(bl|
00000630  6f 63 6b 20 83 32 35 36  29 0d 03 3e 15 20 4c 44  |ock .256)..>. LD|
00000640  59 23 28 62 6c 6f 63 6b  20 81 32 35 36 29 0d 03  |Y#(block .256)..|
00000650  48 0a 20 4c 44 41 23 35  0d 03 52 3b 20 4a 53 52  |H. LDA#5..R; JSR|
00000660  72 65 74 75 72 6e 20 5c  72 65 61 64 20 63 61 6c  |return \read cal|
00000670  61 6c 6f 67 75 65 20 65  6e 74 72 79 20 69 6e 74  |alogue entry int|
00000680  6f 20 6d 65 6d 6f 72 79  20 61 74 20 22 62 6c 6f  |o memory at "blo|
00000690  63 6b 22 0d 03 5c 0a 20  43 4d 50 23 31 0d 03 66  |ck"..\. CMP#1..f|
000006a0  3a 20 42 4e 45 6f 6b 20  5c 65 78 69 74 20 69 66  |: BNEok \exit if|
000006b0  20 66 69 6c 65 20 64 6f  65 73 20 6e 6f 74 20 65  | file does not e|
000006c0  78 69 73 74 2c 20 6f 72  20 69 73 20 61 20 64 69  |xist, or is a di|
000006d0  72 65 63 74 6f 72 79 0d  03 70 10 20 4c 44 41 62  |rectory..p. LDAb|
000006e0  6c 6f 63 6b 2b 26 45 0d  03 7a 08 20 80 23 38 0d  |lock+&E..z. .#8.|
000006f0  03 84 22 20 42 4e 45 6f  6b 20 5c 65 78 69 74 20  |.." BNEok \exit |
00000700  69 66 20 66 69 6c 65 20  69 73 20 6c 6f 63 6b 65  |if file is locke|
00000710  64 0d 03 8e 14 20 4c 44  58 23 65 78 69 73 74 73  |d.... LDX#exists|
00000720  20 83 32 35 36 0d 03 98  14 20 4c 44 59 23 65 78  | .256.... LDY#ex|
00000730  69 73 74 73 20 81 32 35  36 0d 03 a2 0c 20 4a 53  |ists .256.... JS|
00000740  52 74 65 78 74 0d 03 ac  0a 20 4c 44 41 23 30 0d  |Rtext.... LDA#0.|
00000750  03 b6 0d 20 53 54 41 6b  65 79 6e 6f 0d 03 c0 0e  |... STAkeyno....|
00000760  20 2e 77 61 69 74 6c 6f  6f 70 0d 03 ca 0a 20 4c  | .waitloop.... L|
00000770  44 58 23 30 0d 03 d4 0a  20 4c 44 59 23 31 0d 03  |DX#0.... LDY#1..|
00000780  de 0c 20 4c 44 41 23 26  38 31 0d 03 e8 0e 20 4a  |.. LDA#&81.... J|
00000790  53 52 6f 73 62 79 74 65  0d 03 f2 25 20 42 43 43  |SRosbyte...% BCC|
000007a0  6b 65 79 20 5c 4b 65 79  20 70 72 65 73 73 65 64  |key \Key pressed|
000007b0  20 28 6e 6f 74 20 45 73  63 61 70 65 29 0d 03 fc  | (not Escape)...|
000007c0  21 20 43 50 59 23 26 31  42 20 5c 43 6f 64 65 20  |! CPY#&1B \Code |
000007d0  66 6f 72 20 45 73 63 61  70 65 20 6b 65 79 0d 04  |for Escape key..|
000007e0  06 10 20 42 4e 45 77 61  69 74 6c 6f 6f 70 0d 04  |.. BNEwaitloop..|
000007f0  10 08 20 2e 6e 6f 0d 04  1a 0e 20 4a 53 52 6f 73  |.. .no.... JSRos|
00000800  6e 65 77 6c 0d 04 24 0d  20 4c 44 58 61 64 64 2b  |newl..$. LDXadd+|
00000810  31 0d 04 2e 0d 20 4c 44  59 61 64 64 2b 32 0d 04  |1.... LDYadd+2..|
00000820  38 08 20 50 4c 41 0d 04  42 08 20 42 52 4b 0d 04  |8. PLA..B. BRK..|
00000830  4c 0c 20 45 51 55 42 26  39 32 0d 04 56 12 20 45  |L. EQUB&92..V. E|
00000840  51 55 53 22 41 62 6f 72  74 65 64 22 0d 04 60 08  |QUS"Aborted"..`.|
00000850  20 42 52 4b 0d 04 6a 09  20 2e 6b 65 79 0d 04 74  | BRK..j. .key..t|
00000860  08 20 54 58 41 0d 04 7e  0e 20 4a 53 52 6f 73 61  |. TXA..~. JSRosa|
00000870  73 63 69 0d 04 88 0d 20  4c 44 58 6b 65 79 6e 6f  |sci.... LDXkeyno|
00000880  0d 04 92 0e 20 43 4d 50  79 65 73 31 2c 58 0d 04  |.... CMPyes1,X..|
00000890  9c 09 20 42 45 51 79 0d  04 a6 0e 20 43 4d 50 79  |.. BEQy.... CMPy|
000008a0  65 73 32 2c 58 0d 04 b0  0a 20 42 4e 45 6e 6f 0d  |es2,X.... BNEno.|
000008b0  04 ba 07 20 2e 79 0d 04  c4 08 20 49 4e 58 0d 04  |... .y.... INX..|
000008c0  ce 0d 20 53 54 58 6b 65  79 6e 6f 0d 04 d8 0a 20  |.. STXkeyno.... |
000008d0  43 50 58 23 34 0d 04 e2  10 20 42 4e 45 77 61 69  |CPX#4.... BNEwai|
000008e0  74 6c 6f 6f 70 0d 04 ec  08 20 2e 6f 6b 0d 04 f6  |tloop.... .ok...|
000008f0  0c 20 4c 44 41 66 6c 61  67 0d 05 00 0f 20 42 4e  |. LDAflag.... BN|
00000900  45 66 69 6e 64 65 6e 64  0d 05 0a 0d 20 4c 44 58  |Efindend.... LDX|
00000910  61 64 64 2b 31 0d 05 14  0d 20 4c 44 59 61 64 64  |add+1.... LDYadd|
00000920  2b 32 0d 05 1e 08 20 50  4c 41 0d 05 28 1e 20 2e  |+2.... PLA..(. .|
00000930  72 65 74 75 72 6e 20 5c  65 78 69 74 20 66 72 6f  |return \exit fro|
00000940  6d 20 4f 53 46 49 4c 45  0d 05 32 10 20 4a 4d 50  |m OSFILE..2. JMP|
00000950  28 6f 6c 64 76 65 63 29  0d 05 3c 1f 20 2e 66 69  |(oldvec)..<. .fi|
00000960  6e 64 65 6e 64 20 5c 65  78 69 74 20 66 72 6f 6d  |ndend \exit from|
00000970  20 4f 53 46 49 4e 44 0d  05 46 0a 20 4c 44 41 23  | OSFIND..F. LDA#|
00000980  30 0d 05 50 0c 20 53 54  41 66 6c 61 67 0d 05 5a  |0..P. STAflag..Z|
00000990  0d 20 4c 44 58 62 6c 6f  63 6b 0d 05 64 0f 20 4c  |. LDXblock..d. L|
000009a0  44 59 62 6c 6f 63 6b 2b  31 0d 05 6e 08 20 50 4c  |DYblock+1..n. PL|
000009b0  41 0d 05 78 11 20 4a 4d  50 28 6f 6c 64 66 76 65  |A..x. JMP(oldfve|
000009c0  63 29 0d 05 82 09 20 2e  61 64 64 0d 05 8c 0f 20  |c).... .add.... |
000009d0  4c 44 41 26 46 46 46 46  2c 58 0d 05 96 08 20 52  |LDA&FFFF,X.... R|
000009e0  54 53 0d 05 a0 0a 20 2e  74 65 78 74 0d 05 aa 0e  |TS.... .text....|
000009f0  20 4a 53 52 6f 73 6e 65  77 6c 0d 05 b4 0e 20 53  | JSRosnewl.... S|
00000a00  54 58 6c 6f 6f 70 2b 31  0d 05 be 0e 20 53 54 59  |TXloop+1.... STY|
00000a10  6c 6f 6f 70 2b 32 0d 05  c8 0a 20 4c 44 58 23 30  |loop+2.... LDX#0|
00000a20  0d 05 d2 0a 20 2e 6c 6f  6f 70 0d 05 dc 0e 20 4c  |.... .loop.... L|
00000a30  44 41 74 65 78 74 2c 58  0d 05 e6 0e 20 4a 53 52  |DAtext,X.... JSR|
00000a40  6f 73 61 73 63 69 0d 05  f0 08 20 49 4e 58 0d 05  |osasci.... INX..|
00000a50  fa 0a 20 43 4d 50 23 30  0d 06 04 0c 20 42 4e 45  |.. CMP#0.... BNE|
00000a60  6c 6f 6f 70 0d 06 0e 08  20 52 54 53 0d 06 18 09  |loop.... RTS....|
00000a70  20 2e 63 6c 69 0d 06 22  0d 20 53 54 58 61 64 64  | .cli..". STXadd|
00000a80  2b 31 0d 06 2c 0d 20 53  54 59 61 64 64 2b 32 0d  |+1..,. STYadd+2.|
00000a90  06 36 0c 20 4c 44 58 23  26 46 46 0d 06 40 0e 20  |.6. LDX#&FF..@. |
00000aa0  2e 73 74 61 72 6c 6f 6f  70 0d 06 4a 08 20 49 4e  |.starloop..J. IN|
00000ab0  58 0d 06 54 0b 20 4a 53  52 61 64 64 0d 06 5e 1d  |X..T. JSRadd..^.|
00000ac0  20 43 4d 50 23 34 32 20  5c 97 49 49 20 63 6f 64  | CMP#42 \.II cod|
00000ad0  65 20 66 6f 72 20 22 2a  22 0d 06 68 10 20 42 45  |e for "*"..h. BE|
00000ae0  51 73 74 61 72 6c 6f 6f  70 0d 06 72 0a 20 4c 44  |Qstarloop..r. LD|
00000af0  59 23 30 0d 06 7c 0e 20  2e 63 6f 6d 70 6c 6f 6f  |Y#0..|. .comploo|
00000b00  70 0d 06 86 0b 20 4a 53  52 61 64 64 0d 06 90 12  |p.... JSRadd....|
00000b10  20 43 4d 50 64 69 73 61  62 6c 65 31 2c 59 0d 06  | CMPdisable1,Y..|
00000b20  9a 0b 20 42 45 51 69 6e  63 0d 06 a4 12 20 43 4d  |.. BEQinc.... CM|
00000b30  50 64 69 73 61 62 6c 65  32 2c 59 0d 06 ae 0b 20  |Pdisable2,Y.... |
00000b40  42 4e 45 6f 75 74 0d 06  b8 09 20 2e 69 6e 63 0d  |BNEout.... .inc.|
00000b50  06 c2 0b 20 43 4d 50 23  31 33 0d 06 cc 0b 20 42  |... CMP#13.... B|
00000b60  45 51 64 69 73 0d 06 d6  08 20 49 4e 58 0d 06 e0  |EQdis.... INX...|
00000b70  08 20 49 4e 59 0d 06 ea  10 20 4a 4d 50 63 6f 6d  |. INY.... JMPcom|
00000b80  70 6c 6f 6f 70 0d 06 f4  09 20 2e 64 69 73 0d 06  |ploop.... .dis..|
00000b90  fe 08 20 50 48 50 0d 07  08 08 20 53 45 49 0d 07  |.. PHP.... SEI..|
00000ba0  12 0e 20 4c 44 41 6f 6c  64 76 65 63 0d 07 1c 0d  |.. LDAoldvec....|
00000bb0  20 53 54 41 66 69 6c 65  76 0d 07 26 10 20 4c 44  | STAfilev..&. LD|
00000bc0  41 6f 6c 64 76 65 63 2b  31 0d 07 30 0f 20 53 54  |Aoldvec+1..0. ST|
00000bd0  41 66 69 6c 65 76 2b 31  0d 07 3a 0f 20 4c 44 41  |Afilev+1..:. LDA|
00000be0  6f 6c 64 66 76 65 63 0d  07 44 0d 20 53 54 41 66  |oldfvec..D. STAf|
00000bf0  69 6e 64 76 0d 07 4e 11  20 4c 44 41 6f 6c 64 66  |indv..N. LDAoldf|
00000c00  76 65 63 2b 31 0d 07 58  0f 20 53 54 41 66 69 6e  |vec+1..X. STAfin|
00000c10  64 76 2b 31 0d 07 62 0f  20 4c 44 41 6f 6c 64 63  |dv+1..b. LDAoldc|
00000c20  6c 69 76 0d 07 6c 0c 20  53 54 41 63 6c 69 76 0d  |liv..l. STAcliv.|
00000c30  07 76 11 20 4c 44 41 6f  6c 64 63 6c 69 76 2b 31  |.v. LDAoldcliv+1|
00000c40  0d 07 80 0e 20 53 54 41  63 6c 69 76 2b 31 0d 07  |.... STAcliv+1..|
00000c50  8a 08 20 43 4c 49 0d 07  94 15 20 4c 44 58 23 64  |.. CLI.... LDX#d|
00000c60  69 73 6d 65 73 73 20 83  32 35 36 0d 07 9e 15 20  |ismess .256.... |
00000c70  4c 44 59 23 64 69 73 6d  65 73 73 20 81 32 35 36  |LDY#dismess .256|
00000c80  0d 07 a8 0c 20 4a 53 52  74 65 78 74 0d 07 b2 08  |.... JSRtext....|
00000c90  20 50 4c 50 0d 07 bc 08  20 52 54 53 0d 07 c6 09  | PLP.... RTS....|
00000ca0  20 2e 6f 75 74 0d 07 d0  0d 20 4c 44 58 61 64 64  | .out.... LDXadd|
00000cb0  2b 31 0d 07 da 0d 20 4c  44 59 61 64 64 2b 32 0d  |+1.... LDYadd+2.|
00000cc0  07 e4 11 20 4a 4d 50 28  6f 6c 64 63 6c 69 76 29  |... JMP(oldcliv)|
00000cd0  0d 07 ee 3a 20 2e 65 78  69 73 74 73 20 45 51 55  |...: .exists EQU|
00000ce0  53 22 46 69 6c 65 20 65  78 69 73 74 73 20 2d 20  |S"File exists - |
00000cf0  4f 76 65 72 77 72 69 74  65 20 6f 6c 64 20 66 69  |Overwrite old fi|
00000d00  6c 65 3f 22 3a 45 51 55  42 30 0d 07 f8 9b 20 2e  |le?":EQUB0.... .|
00000d10  69 6e 74 72 6f 20 45 51  55 53 22 50 52 4f 54 45  |intro EQUS"PROTE|
00000d20  43 54 20 75 74 69 6c 69  74 79 20 69 6e 73 74 61  |CT utility insta|
00000d30  6c 6c 65 64 2e 20 59 6f  75 20 77 69 6c 6c 20 6e  |lled. You will n|
00000d40  6f 77 20 62 65 20 61 73  6b 65 64 20 74 6f 20 63  |ow be asked to c|
00000d50  6f 6e 66 69 72 6d 20 28  6f 72 20 61 62 6f 72 74  |onfirm (or abort|
00000d60  29 20 61 6e 79 20 66 69  6c 65 20 6f 70 65 72 61  |) any file opera|
00000d70  74 69 6f 6e 20 77 68 69  63 68 20 69 6e 76 6f 6c  |tion which invol|
00000d80  76 65 73 20 6f 76 65 72  77 72 69 74 69 6e 67 20  |ves overwriting |
00000d90  20 20 20 61 6e 20 65 78  69 73 74 69 6e 67 20 66  |   an existing f|
00000da0  69 6c 65 2e 22 0d 08 02  44 20 45 51 55 42 31 33  |ile."...D EQUB13|
00000db0  3a 45 51 55 53 22 54 79  70 65 20 2a 44 49 53 41  |:EQUS"Type *DISA|
00000dc0  42 4c 45 20 74 6f 20 64  69 73 61 62 6c 65 20 74  |BLE to disable t|
00000dd0  68 65 20 75 74 69 6c 69  74 79 2e 22 3a 45 51 55  |he utility.":EQU|
00000de0  42 31 33 3a 45 51 55 42  30 0d 08 0c 3a 20 2e 64  |B13:EQUB0...: .d|
00000df0  69 73 6d 65 73 73 20 45  51 55 53 22 50 52 4f 54  |ismess EQUS"PROT|
00000e00  45 43 54 20 75 74 69 6c  69 74 79 20 64 69 73 61  |ECT utility disa|
00000e10  62 6c 65 64 2e 22 3a 45  51 55 42 31 33 3a 45 51  |bled.":EQUB13:EQ|
00000e20  55 42 30 0d 08 16 23 20  2e 64 69 73 61 62 6c 65  |UB0...# .disable|
00000e30  31 20 45 51 55 53 22 44  49 53 41 42 4c 45 22 3a  |1 EQUS"DISABLE":|
00000e40  45 51 55 42 31 33 0d 08  20 23 20 2e 64 69 73 61  |EQUB13.. # .disa|
00000e50  62 6c 65 32 20 45 51 55  53 22 64 69 73 61 62 6c  |ble2 EQUS"disabl|
00000e60  65 22 3a 45 51 55 42 31  33 0d 08 2a 1b 20 2e 79  |e":EQUB13..*. .y|
00000e70  65 73 31 20 45 51 55 53  22 59 45 53 22 3a 45 51  |es1 EQUS"YES":EQ|
00000e80  55 42 31 33 0d 08 34 1b  20 2e 79 65 73 32 20 45  |UB13..4. .yes2 E|
00000e90  51 55 53 22 79 65 73 22  3a 45 51 55 42 31 33 0d  |QUS"yes":EQUB13.|
00000ea0  08 3e 6f 20 2e 63 6f 64  65 65 6e 64 20 5c 4f 6e  |.>o .codeend \On|
00000eb0  6c 79 20 73 61 76 65 20  75 70 20 74 6f 20 68 65  |ly save up to he|
00000ec0  72 65 2c 20 74 6f 20 61  76 6f 69 64 20 63 6f 72  |re, to avoid cor|
00000ed0  72 75 70 74 69 6e 67 20  74 68 65 20 72 65 74 75  |rupting the retu|
00000ee0  72 6e 20 61 64 64 72 65  73 73 65 73 20 69 66 20  |rn addresses if |
00000ef0  74 68 65 20 63 6f 64 65  20 69 73 20 72 75 6e 20  |the code is run |
00000f00  61 20 73 65 63 6f 6e 64  20 74 69 6d 65 2e 0d 08  |a second time...|
00000f10  48 12 20 2e 6f 6c 64 76  65 63 20 45 51 55 57 30  |H. .oldvec EQUW0|
00000f20  0d 08 52 13 20 2e 6f 6c  64 66 76 65 63 20 45 51  |..R. .oldfvec EQ|
00000f30  55 57 30 0d 08 5c 13 20  2e 6f 6c 64 63 6c 69 76  |UW0..\. .oldcliv|
00000f40  20 45 51 55 57 30 0d 08  66 10 20 2e 66 6c 61 67  | EQUW0..f. .flag|
00000f50  20 45 51 55 42 30 0d 08  70 11 20 2e 6b 65 79 6e  | EQUB0..p. .keyn|
00000f60  6f 20 45 51 55 42 30 0d  08 7a 0b 20 2e 62 6c 6f  |o EQUB0..z. .blo|
00000f70  63 6b 0d 08 84 0d 20 5d  3a ed 20 70 61 73 73 0d  |ck.... ]:. pass.|
00000f80  08 8e 06 20 f1 0d 08 98  23 20 e8 22 46 69 6c 65  |... ....# ."File|
00000f90  6e 61 6d 65 20 66 6f 72  20 63 6f 64 65 22 2c 66  |name for code",f|
00000fa0  69 6c 65 6e 61 6d 65 24  0d 08 a2 30 20 ff 22 53  |ilename$...0 ."S|
00000fb0  41 56 45 20 22 2b 66 69  6c 65 6e 61 6d 65 24 2b  |AVE "+filename$+|
00000fc0  22 20 22 2b c3 7e 63 6f  64 65 2b 22 20 22 2b c3  |" "+.~code+" "+.|
00000fd0  7e 63 6f 64 65 65 6e 64  0d 08 ac 45 20 f1 27 22  |~codeend...E .'"|
00000fe0  54 79 70 65 20 2a 22 3b  66 69 6c 65 6e 61 6d 65  |Type *";filename|
00000ff0  24 3b 22 20 74 6f 20 69  6e 74 61 6c 6c 20 74 68  |$;" to intall th|
00001000  65 20 73 61 76 65 22 27  22 70 72 6f 74 65 63 74  |e save"'"protect|
00001010  69 6f 6e 20 70 72 6f 67  72 61 6d 2e 22 0d ff     |ion program."..|
0000101f
Check3.m0
Check3.m1
Check3.m2
Check3.m4
Check3.m5