Home » CEEFAX disks » telesoftware1.adl » COMPARE

COMPARE

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 » CEEFAX disks » telesoftware1.adl
Filename: COMPARE
Read OK:
File size: 0E44 bytes
Load address: 1900
Exec address: 8023
File contents
   10REM"  �COMPARE  vs 0.98 (ceefax)
   20REM"    �Peter Vince  6/10/85
   30REM"�(Prestel Mailbox  372272713)
   40REM"�This program will compare two �files on disk, and report any differ-  �ences.
   50REM"�Users with BASIC-2 should use �OPENIN�in lines 190/200�OPENUP�has been�used for compatibility with BASIC-1.   �  Similarly,�PROCoscli�can be replaced �by the�OSCLI�command (870/900/80/1050)
   60MODE7
   70Afile$=STRING$(24," ")
   80ON ERROR GOTO1150
   90room%=(HIMEM-TOP-&198)DIV&200*&100
  100DIM params 30,M% room%+4,N% room%+4
  110PRINTCHR$&8D" �General Purpose Comparison Program"'CHR$&8D" �General Purpose Comparison Program"'"  "CHR$&93;STRING$(34,"`")
  120VDU28,0,24,39,3,12
  130flag1=FALSE:flag3=FALSE
  140*CAT
  150PRINT''"  �(or star command)";CHR$11;CHR$11
  160INPUTLINE"�Enter name of file 'A'�"Afile$
  170REPEAT IF LEFT$(Afile$,1)=" " THEN Afile$=RIGHT$(Afile$,LEN(Afile$)-1):UNTIL FALSE  ELSE UNTIL TRUE
  180IF LEFT$(Afile$,1)="*" THEN PROCcommand:GOTO140
  190INPUT"�Enter name of file 'B'�"Bfile$
  200Ahandle%=OPENUP(Afile$):IF Ahandle%=0 THEN PROCnotfound(Afile$):RUN
  210Bhandle%=OPENUP(Bfile$):IF Bhandle%=0 THEN PROCnotfound(Bfile$):RUN
  220 
  230PRINT'"�Output results to printer? (Y/N)�";
  240IF (GET AND &DF) = ASC"Y" THEN PRINT"Yes":pflag=TRUE ELSE PRINT"No":pflag=FALSE
  250VDU23,1,0;0;0;0;
  260FOR I%=0 TO VPOS-5:PRINTTAB(0,21):NEXT
  270key%=INKEY(40)
  280VDU28,0,24,39,6,30,10
  290Asize%=EXT#Ahandle%
  300Bsize%=EXT#Bhandle%
  310IF Asize%<Bsize% THEN ext%=Asize% ELSE ext%=Bsize%
  320IF pflag THEN VDU2:PRINT'"Comparing ";Afile$;" and ";Bfile$
  330IF Asize%-Bsize% THEN PRINT''" �Size difference!"'"�"Afile$"�is�&";~Asize%;","'"�";Bfile$"�is�&";~Bsize%:flag1=0.5 ELSE PRINT''"�File size is�&";~ext%
  340VDU3
  350PRINT'"�Buffer size available is�&";~room%;
  360IF ext%>room% THEN PRINT". �Files"'"�will be compared in ";(ext%-1)DIVroom%+1;" chunks of ";room%/1024;"k"' ELSE PRINT'
  370 
  380FOR I%=0 TO (ext%-1)DIVroom%
  390 
  400lim%=ext%-I%*room%-1:IF lim%>room%-1 THEN lim%=room%-1
  410PROCload
  420 
  430FOR J%=0 TO lim% STEP&100
  440flag2=FALSE
  450PRINT'CHR$11"�Comparing block &";~J%DIV&100+I%*(room%DIV256);
  460 
  470FOR K%=J% TO J%+252 STEP4
  480IF K%!M% - K%!N% THEN PROCdiff
  490NEXT:IF flag2 THEN PRINT
  500NEXT,
  510 
  520IF pflag THEN VDU2
  530IF flag1>0 THEN PRINT''"�All done,�";flag1 DIV1;"�differences found"; ELSE PRINT''"�ALL OK!"
  540IF flag1-INT(flag1) > 0 THEN PRINT","'"�but file sizes are different." ELSE PRINT
  550CLOSE#0
  560VDU23,1,1;0;0;0;3
  570PRINT'"�Another Pair?�(Y/N)�";
  580IF (GET AND &DF)=ASC"Y" THEN GOTO120
  590PRINT"No"':VDU26,31,0,24
  600END
  610 
  620DEFPROCnotfound(file$)
  630PRINT'"�File�"file$"�not found."
  640CLOSE#0
  650PRINT'"�Press a key to re-start";
  660IF GET=ASC"*" THEN *FX138,0,42
  670ENDPROC
  680 
  690DEFPROCdiff
  700IF pflag THEN VDU2
  710FOR Z%=K% TO K%+3
  720IF Z%>lim% THEN 760
  730IF flag3=FALSE THEN PROCname
  740IF Z%?M% - Z%?N% THEN PRINT'"Difference at &";~I%*room%+Z%;TAB(22)"&";RIGHT$("0"+STR$~Z%?M%,2);TAB(29)"&";RIGHT$("0"+STR$~Z%?N%,2);:flag1=flag1+1:flag2=TRUE
  750flag3=TRUE
  760NEXT
  770VDU3
  780ENDPROC
  790 
  800DEFPROCname
  810A%=LEN(Afile$):B%=LEN(Bfile$)
  820PRINT'"�"TAB(26-A%+(A%<2)+(A%<4)-((B%<7)AND(A%>6)));Afile$;
  830PRINTTAB(30+(B%>2)+(B%>4)+(B%>6));Bfile$;
  840ENDPROC
  850 
  860DEFPROCload
  870REM"�If files are smaller than the �maximum size that can be checked in    �one go, then *LOAD them, else use      �OSGBPB to load in each chunk (room%)
  880X%=params:Y%=X%DIV256:A%=4
  890IF ext%<=room% THEN PRINT'CHR$11"�Loading�";Afile$;TAB(39); ELSE PRINT'CHR$11"�Loading chunk no.";I%+1;" from�";Afile$;TAB(39);
  900IF Asize%<=room% THEN PROCoscli("LOAD "+Afile$+" "+STR$~M%) ELSE ?X%=Ahandle%:X%!1=M%:X%!5=lim%+1:CALL&FFD1
  910lim%!(M%+1)=0
  920IF ext%<=room% THEN PRINT'CHR$11"�Loading�";Bfile$;TAB(39); ELSE PRINT'CHR$11"�Loading chunk no.";I%+1;" from�";Bfile$;TAB(39);
  930IF Bsize%<=room% THEN PROCoscli("LOAD "+Bfile$+" "+STR$~N%) ELSE ?X%=Bhandle%:X%!1=N%:X%!5=lim%+1:CALL&FFD1
  940lim%!(N%+1)=0
  950PRINTCHR$13;TAB(39);
  960ENDPROC
  970 
  980DEFPROCcommand
  990VDU23,1,0;0;0;0;
 1000CLS
 1010PROCoscli(Afile$)
 1020PRINTTAB(7,21)"�Press a key to continue";
 1030IF GET=ASC"*" THEN *FX138,0,42
 1040CLS
 1050VDU23,1,1;0;0;0;
 1060ENDPROC
 1070 
 1080DEFPROCoscli(command$)
 1090$params=command$
 1100X%=params:Y%=X%DIV256
 1110CALL&FFF7
 1120ENDPROC
 1130 
 1140REM"�Error routine
 1150CLOSE#0
 1160PRINT''"�";:VDU18:REPORT
 1170IF ERR=17 THEN PRINT"d"' ELSE PRINT" at line ";ERL'
 1180VDU3,26,31,0,24,7,23,1,1;0;0;0;

"�"  �COMPARE  vs 0.98 (ceefax)
�"    �Peter Vince  6/10/85
#�"�(Prestel Mailbox  372272713)
(T�"�This program will compare two �files on disk, and report any differ-  �ences.
2��"�Users with BASIC-2 should use �OPENIN�in lines 190/200�OPENUP�has been�used for compatibility with BASIC-1.   �  Similarly,�PROCoscli�can be replaced �by the�OSCLI�command (870/900/80/1050)
<�7
FAfile$=�24," ")
P
� � �D~D
Zroom%=(�-�P-&198)�&200*&100
d%� params 30,M% room%+4,N% room%+4
nl�&8D" �General Purpose Comparison Program"'�&8D" �General Purpose Comparison Program"'"  "�&93;�34,"`")
x�28,0,24,39,3,12
�flag1=�:flag3=�
�*CAT
�%�''"  �(or star command)";�11;�11
�&�"�Enter name of file 'A'�"Afile$
�?� � �Afile$,1)=" " � Afile$=�Afile$,�(Afile$)-1):� �  � � �
�%� �Afile$,1)="*" � �command:�tL@
�%�"�Enter name of file 'B'�"Bfile$
�9Ahandle%=�(Afile$):� Ahandle%=0 � �notfound(Afile$):�
�9Bhandle%=�(Bfile$):� Bhandle%=0 � �notfound(Bfile$):�
� 
�+�'"�Output results to printer? (Y/N)�";
�7� (� � &DF) = �"Y" � �"Yes":pflag=� � �"No":pflag=�
��23,1,0;0;0;0;
� I%=0 � �-5:�0,21):�
key%=�(40)
�28,0,24,39,6,30,10
"Asize%=�#Ahandle%
,Bsize%=�#Bhandle%
6/� Asize%<Bsize% � ext%=Asize% � ext%=Bsize%
@5� pflag � �2:�'"Comparing ";Afile$;" and ";Bfile$
J�� Asize%-Bsize% � �''" �Size difference!"'"�"Afile$"�is�&";~Asize%;","'"�";Bfile$"�is�&";~Bsize%:flag1=0.5 � �''"�File size is�&";~ext%
T�3
^+�'"�Buffer size available is�&";~room%;
hj� ext%>room% � �". �Files"'"�will be compared in ";(ext%-1)�room%+1;" chunks of ";room%/1024;"k"' � �'
r 
|� I%=0 � (ext%-1)�room%
� 
�6lim%=ext%-I%*room%-1:� lim%>room%-1 � lim%=room%-1
�	�load
� 
�� J%=0 � lim% �&100
�flag2=�
�6�'�11"�Comparing block &";~J%�&100+I%*(room%�256);
� 
�� K%=J% � J%+252 �4
�� K%!M% - K%!N% � �diff
��:� flag2 � �
��,
� 
� pflag � �2
O� flag1>0 � �''"�All done,�";flag1 �1;"�differences found"; � �''"�ALL OK!"
D� flag1-�(flag1) > 0 � �","'"�but file sizes are different." � �
&�#0
0�23,1,1;0;0;0;3
:�'"�Another Pair?�(Y/N)�";
D� (� � &DF)=�"Y" � �Dx@
N�"No"':�26,31,0,24
X�
b 
l��notfound(file$)
v �'"�File�"file$"�not found."
��#0
�!�'"�Press a key to re-start";
�� �=�"*" � *FX138,0,42
��
� 
�
��diff
�� pflag � �2
�� Z%=K% � K%+3
�� Z%>lim% � �dxB
�� flag3=� � �name
�}� Z%?M% - Z%?N% � �'"Difference at &";~I%*room%+Z%;�22)"&";�"0"+�~Z%?M%,2);�29)"&";�"0"+�~Z%?N%,2);:flag1=flag1+1:flag2=�
�flag3=�
��
�3
�
 
 
��name
*A%=�(Afile$):B%=�(Bfile$)
46�'"�"�26-A%+(A%<2)+(A%<4)-((B%<7)�(A%>6)));Afile$;
>&�30+(B%>2)+(B%>4)+(B%>6));Bfile$;
H�
R 
\
��load
f��"�If files are smaller than the �maximum size that can be checked in    �one go, then *LOAD them, else use      �OSGBPB to load in each chunk (room%)
pX%=params:Y%=X%�256:A%=4
zh� ext%<=room% � �'�11"�Loading�";Afile$;�39); � �'�11"�Loading chunk no.";I%+1;" from�";Afile$;�39);
�_� Asize%<=room% � �oscli("LOAD "+Afile$+" "+�~M%) � ?X%=Ahandle%:X%!1=M%:X%!5=lim%+1:�&FFD1
�lim%!(M%+1)=0
�h� ext%<=room% � �'�11"�Loading�";Bfile$;�39); � �'�11"�Loading chunk no.";I%+1;" from�";Bfile$;�39);
�_� Bsize%<=room% � �oscli("LOAD "+Bfile$+" "+�~N%) � ?X%=Bhandle%:X%!1=N%:X%!5=lim%+1:�&FFD1
�lim%!(N%+1)=0
��13;�39);
��
� 
�
��command
��23,1,0;0;0;0;
��
��oscli(Afile$)
�&�7,21)"�Press a key to continue";
� �=�"*" � *FX138,0,42
�
�23,1,1;0;0;0;
$�
. 
8��oscli(command$)
B$params=command$
LX%=params:Y%=X%�256
V
�&FFF7
`�
j 
t�"�Error routine
~�#0
��''"�";:�18:�
�$� �=17 � �"d"' � �" at line ";�'
�!�3,26,31,0,24,7,23,1,1;0;0;0;
�
00000000  0d 00 0a 22 f4 22 20 20  83 43 4f 4d 50 41 52 45  |..."."  .COMPARE|
00000010  20 20 76 73 20 30 2e 39  38 20 28 63 65 65 66 61  |  vs 0.98 (ceefa|
00000020  78 29 0d 00 14 1f f4 22  20 20 20 20 82 50 65 74  |x)....."    .Pet|
00000030  65 72 20 56 69 6e 63 65  20 20 36 2f 31 30 2f 38  |er Vince  6/10/8|
00000040  35 0d 00 1e 23 f4 22 85  28 50 72 65 73 74 65 6c  |5...#.".(Prestel|
00000050  20 4d 61 69 6c 62 6f 78  20 20 33 37 32 32 37 32  | Mailbox  372272|
00000060  37 31 33 29 0d 00 28 54  f4 22 86 54 68 69 73 20  |713)..(T.".This |
00000070  70 72 6f 67 72 61 6d 20  77 69 6c 6c 20 63 6f 6d  |program will com|
00000080  70 61 72 65 20 74 77 6f  20 86 66 69 6c 65 73 20  |pare two .files |
00000090  6f 6e 20 64 69 73 6b 2c  20 61 6e 64 20 72 65 70  |on disk, and rep|
000000a0  6f 72 74 20 61 6e 79 20  64 69 66 66 65 72 2d 20  |ort any differ- |
000000b0  20 86 65 6e 63 65 73 2e  0d 00 32 c4 f4 22 83 55  | .ences...2..".U|
000000c0  73 65 72 73 20 77 69 74  68 20 42 41 53 49 43 2d  |sers with BASIC-|
000000d0  32 20 73 68 6f 75 6c 64  20 75 73 65 20 82 4f 50  |2 should use .OP|
000000e0  45 4e 49 4e 83 69 6e 20  6c 69 6e 65 73 20 31 39  |ENIN.in lines 19|
000000f0  30 2f 32 30 30 82 4f 50  45 4e 55 50 83 68 61 73  |0/200.OPENUP.has|
00000100  20 62 65 65 6e 83 75 73  65 64 20 66 6f 72 20 63  | been.used for c|
00000110  6f 6d 70 61 74 69 62 69  6c 69 74 79 20 77 69 74  |ompatibility wit|
00000120  68 20 42 41 53 49 43 2d  31 2e 20 20 20 83 20 20  |h BASIC-1.   .  |
00000130  53 69 6d 69 6c 61 72 6c  79 2c 82 50 52 4f 43 6f  |Similarly,.PROCo|
00000140  73 63 6c 69 83 63 61 6e  20 62 65 20 72 65 70 6c  |scli.can be repl|
00000150  61 63 65 64 20 83 62 79  20 74 68 65 82 4f 53 43  |aced .by the.OSC|
00000160  4c 49 83 63 6f 6d 6d 61  6e 64 20 28 38 37 30 2f  |LI.command (870/|
00000170  39 30 30 2f 38 30 2f 31  30 35 30 29 0d 00 3c 06  |900/80/1050)..<.|
00000180  eb 37 0d 00 46 13 41 66  69 6c 65 24 3d c4 32 34  |.7..F.Afile$=.24|
00000190  2c 22 20 22 29 0d 00 50  0d ee 20 85 20 e5 8d 44  |," ")..P.. . ..D|
000001a0  7e 44 0d 00 5a 1f 72 6f  6f 6d 25 3d 28 93 2d b8  |~D..Z.room%=(.-.|
000001b0  50 2d 26 31 39 38 29 81  26 32 30 30 2a 26 31 30  |P-&198).&200*&10|
000001c0  30 0d 00 64 25 de 20 70  61 72 61 6d 73 20 33 30  |0..d%. params 30|
000001d0  2c 4d 25 20 72 6f 6f 6d  25 2b 34 2c 4e 25 20 72  |,M% room%+4,N% r|
000001e0  6f 6f 6d 25 2b 34 0d 00  6e 6c f1 bd 26 38 44 22  |oom%+4..nl..&8D"|
000001f0  20 83 47 65 6e 65 72 61  6c 20 50 75 72 70 6f 73  | .General Purpos|
00000200  65 20 43 6f 6d 70 61 72  69 73 6f 6e 20 50 72 6f  |e Comparison Pro|
00000210  67 72 61 6d 22 27 bd 26  38 44 22 20 83 47 65 6e  |gram"'.&8D" .Gen|
00000220  65 72 61 6c 20 50 75 72  70 6f 73 65 20 43 6f 6d  |eral Purpose Com|
00000230  70 61 72 69 73 6f 6e 20  50 72 6f 67 72 61 6d 22  |parison Program"|
00000240  27 22 20 20 22 bd 26 39  33 3b c4 33 34 2c 22 60  |'"  ".&93;.34,"`|
00000250  22 29 0d 00 78 14 ef 32  38 2c 30 2c 32 34 2c 33  |")..x..28,0,24,3|
00000260  39 2c 33 2c 31 32 0d 00  82 13 66 6c 61 67 31 3d  |9,3,12....flag1=|
00000270  a3 3a 66 6c 61 67 33 3d  a3 0d 00 8c 08 2a 43 41  |.:flag3=.....*CA|
00000280  54 0d 00 96 25 f1 27 27  22 20 20 86 28 6f 72 20  |T...%.''"  .(or |
00000290  73 74 61 72 20 63 6f 6d  6d 61 6e 64 29 22 3b bd  |star command)";.|
000002a0  31 31 3b bd 31 31 0d 00  a0 26 e8 86 22 83 45 6e  |11;.11...&..".En|
000002b0  74 65 72 20 6e 61 6d 65  20 6f 66 20 66 69 6c 65  |ter name of file|
000002c0  20 27 41 27 87 22 41 66  69 6c 65 24 0d 00 aa 3f  | 'A'."Afile$...?|
000002d0  f5 20 e7 20 c0 41 66 69  6c 65 24 2c 31 29 3d 22  |. . .Afile$,1)="|
000002e0  20 22 20 8c 20 41 66 69  6c 65 24 3d c2 41 66 69  | " . Afile$=.Afi|
000002f0  6c 65 24 2c a9 28 41 66  69 6c 65 24 29 2d 31 29  |le$,.(Afile$)-1)|
00000300  3a fd 20 a3 20 20 8b 20  fd 20 b9 0d 00 b4 25 e7  |:. .  . . ....%.|
00000310  20 c0 41 66 69 6c 65 24  2c 31 29 3d 22 2a 22 20  | .Afile$,1)="*" |
00000320  8c 20 f2 63 6f 6d 6d 61  6e 64 3a e5 8d 74 4c 40  |. .command:..tL@|
00000330  0d 00 be 25 e8 22 83 45  6e 74 65 72 20 6e 61 6d  |...%.".Enter nam|
00000340  65 20 6f 66 20 66 69 6c  65 20 27 42 27 87 22 42  |e of file 'B'."B|
00000350  66 69 6c 65 24 0d 00 c8  39 41 68 61 6e 64 6c 65  |file$...9Ahandle|
00000360  25 3d ad 28 41 66 69 6c  65 24 29 3a e7 20 41 68  |%=.(Afile$):. Ah|
00000370  61 6e 64 6c 65 25 3d 30  20 8c 20 f2 6e 6f 74 66  |andle%=0 . .notf|
00000380  6f 75 6e 64 28 41 66 69  6c 65 24 29 3a f9 0d 00  |ound(Afile$):...|
00000390  d2 39 42 68 61 6e 64 6c  65 25 3d ad 28 42 66 69  |.9Bhandle%=.(Bfi|
000003a0  6c 65 24 29 3a e7 20 42  68 61 6e 64 6c 65 25 3d  |le$):. Bhandle%=|
000003b0  30 20 8c 20 f2 6e 6f 74  66 6f 75 6e 64 28 42 66  |0 . .notfound(Bf|
000003c0  69 6c 65 24 29 3a f9 0d  00 dc 05 20 0d 00 e6 2b  |ile$):..... ...+|
000003d0  f1 27 22 83 4f 75 74 70  75 74 20 72 65 73 75 6c  |.'".Output resul|
000003e0  74 73 20 74 6f 20 70 72  69 6e 74 65 72 3f 20 28  |ts to printer? (|
000003f0  59 2f 4e 29 87 22 3b 0d  00 f0 37 e7 20 28 a5 20  |Y/N).";...7. (. |
00000400  80 20 26 44 46 29 20 3d  20 97 22 59 22 20 8c 20  |. &DF) = ."Y" . |
00000410  f1 22 59 65 73 22 3a 70  66 6c 61 67 3d b9 20 8b  |."Yes":pflag=. .|
00000420  20 f1 22 4e 6f 22 3a 70  66 6c 61 67 3d a3 0d 00  | ."No":pflag=...|
00000430  fa 12 ef 32 33 2c 31 2c  30 3b 30 3b 30 3b 30 3b  |...23,1,0;0;0;0;|
00000440  0d 01 04 1a e3 20 49 25  3d 30 20 b8 20 bc 2d 35  |..... I%=0 . .-5|
00000450  3a f1 8a 30 2c 32 31 29  3a ed 0d 01 0e 0e 6b 65  |:..0,21):.....ke|
00000460  79 25 3d a6 28 34 30 29  0d 01 18 17 ef 32 38 2c  |y%=.(40).....28,|
00000470  30 2c 32 34 2c 33 39 2c  36 2c 33 30 2c 31 30 0d  |0,24,39,6,30,10.|
00000480  01 22 15 41 73 69 7a 65  25 3d a2 23 41 68 61 6e  |.".Asize%=.#Ahan|
00000490  64 6c 65 25 0d 01 2c 15  42 73 69 7a 65 25 3d a2  |dle%..,.Bsize%=.|
000004a0  23 42 68 61 6e 64 6c 65  25 0d 01 36 2f e7 20 41  |#Bhandle%..6/. A|
000004b0  73 69 7a 65 25 3c 42 73  69 7a 65 25 20 8c 20 65  |size%<Bsize% . e|
000004c0  78 74 25 3d 41 73 69 7a  65 25 20 8b 20 65 78 74  |xt%=Asize% . ext|
000004d0  25 3d 42 73 69 7a 65 25  0d 01 40 35 e7 20 70 66  |%=Bsize%..@5. pf|
000004e0  6c 61 67 20 8c 20 ef 32  3a f1 27 22 43 6f 6d 70  |lag . .2:.'"Comp|
000004f0  61 72 69 6e 67 20 22 3b  41 66 69 6c 65 24 3b 22  |aring ";Afile$;"|
00000500  20 61 6e 64 20 22 3b 42  66 69 6c 65 24 0d 01 4a  | and ";Bfile$..J|
00000510  8b e7 20 41 73 69 7a 65  25 2d 42 73 69 7a 65 25  |.. Asize%-Bsize%|
00000520  20 8c 20 f1 27 27 22 20  86 53 69 7a 65 20 64 69  | . .''" .Size di|
00000530  66 66 65 72 65 6e 63 65  21 22 27 22 83 22 41 66  |fference!"'"."Af|
00000540  69 6c 65 24 22 86 69 73  87 26 22 3b 7e 41 73 69  |ile$".is.&";~Asi|
00000550  7a 65 25 3b 22 2c 22 27  22 83 22 3b 42 66 69 6c  |ze%;","'".";Bfil|
00000560  65 24 22 86 69 73 87 26  22 3b 7e 42 73 69 7a 65  |e$".is.&";~Bsize|
00000570  25 3a 66 6c 61 67 31 3d  30 2e 35 20 8b 20 f1 27  |%:flag1=0.5 . .'|
00000580  27 22 86 46 69 6c 65 20  73 69 7a 65 20 69 73 87  |'".File size is.|
00000590  26 22 3b 7e 65 78 74 25  0d 01 54 06 ef 33 0d 01  |&";~ext%..T..3..|
000005a0  5e 2b f1 27 22 86 42 75  66 66 65 72 20 73 69 7a  |^+.'".Buffer siz|
000005b0  65 20 61 76 61 69 6c 61  62 6c 65 20 69 73 87 26  |e available is.&|
000005c0  22 3b 7e 72 6f 6f 6d 25  3b 0d 01 68 6a e7 20 65  |";~room%;..hj. e|
000005d0  78 74 25 3e 72 6f 6f 6d  25 20 8c 20 f1 22 2e 20  |xt%>room% . .". |
000005e0  86 46 69 6c 65 73 22 27  22 86 77 69 6c 6c 20 62  |.Files"'".will b|
000005f0  65 20 63 6f 6d 70 61 72  65 64 20 69 6e 20 22 3b  |e compared in ";|
00000600  28 65 78 74 25 2d 31 29  81 72 6f 6f 6d 25 2b 31  |(ext%-1).room%+1|
00000610  3b 22 20 63 68 75 6e 6b  73 20 6f 66 20 22 3b 72  |;" chunks of ";r|
00000620  6f 6f 6d 25 2f 31 30 32  34 3b 22 6b 22 27 20 8b  |oom%/1024;"k"' .|
00000630  20 f1 27 0d 01 72 05 20  0d 01 7c 1b e3 20 49 25  | .'..r. ..|.. I%|
00000640  3d 30 20 b8 20 28 65 78  74 25 2d 31 29 81 72 6f  |=0 . (ext%-1).ro|
00000650  6f 6d 25 0d 01 86 05 20  0d 01 90 36 6c 69 6d 25  |om%.... ...6lim%|
00000660  3d 65 78 74 25 2d 49 25  2a 72 6f 6f 6d 25 2d 31  |=ext%-I%*room%-1|
00000670  3a e7 20 6c 69 6d 25 3e  72 6f 6f 6d 25 2d 31 20  |:. lim%>room%-1 |
00000680  8c 20 6c 69 6d 25 3d 72  6f 6f 6d 25 2d 31 0d 01  |. lim%=room%-1..|
00000690  9a 09 f2 6c 6f 61 64 0d  01 a4 05 20 0d 01 ae 17  |...load.... ....|
000006a0  e3 20 4a 25 3d 30 20 b8  20 6c 69 6d 25 20 88 26  |. J%=0 . lim% .&|
000006b0  31 30 30 0d 01 b8 0b 66  6c 61 67 32 3d a3 0d 01  |100....flag2=...|
000006c0  c2 36 f1 27 bd 31 31 22  86 43 6f 6d 70 61 72 69  |.6.'.11".Compari|
000006d0  6e 67 20 62 6c 6f 63 6b  20 26 22 3b 7e 4a 25 81  |ng block &";~J%.|
000006e0  26 31 30 30 2b 49 25 2a  28 72 6f 6f 6d 25 81 32  |&100+I%*(room%.2|
000006f0  35 36 29 3b 0d 01 cc 05  20 0d 01 d6 17 e3 20 4b  |56);.... ..... K|
00000700  25 3d 4a 25 20 b8 20 4a  25 2b 32 35 32 20 88 34  |%=J% . J%+252 .4|
00000710  0d 01 e0 1b e7 20 4b 25  21 4d 25 20 2d 20 4b 25  |..... K%!M% - K%|
00000720  21 4e 25 20 8c 20 f2 64  69 66 66 0d 01 ea 11 ed  |!N% . .diff.....|
00000730  3a e7 20 66 6c 61 67 32  20 8c 20 f1 0d 01 f4 06  |:. flag2 . .....|
00000740  ed 2c 0d 01 fe 05 20 0d  02 08 10 e7 20 70 66 6c  |.,.... ..... pfl|
00000750  61 67 20 8c 20 ef 32 0d  02 12 4f e7 20 66 6c 61  |ag . .2...O. fla|
00000760  67 31 3e 30 20 8c 20 f1  27 27 22 86 41 6c 6c 20  |g1>0 . .''".All |
00000770  64 6f 6e 65 2c 87 22 3b  66 6c 61 67 31 20 81 31  |done,.";flag1 .1|
00000780  3b 22 86 64 69 66 66 65  72 65 6e 63 65 73 20 66  |;".differences f|
00000790  6f 75 6e 64 22 3b 20 8b  20 f1 27 27 22 82 41 4c  |ound"; . .''".AL|
000007a0  4c 20 4f 4b 21 22 0d 02  1c 44 e7 20 66 6c 61 67  |L OK!"...D. flag|
000007b0  31 2d a8 28 66 6c 61 67  31 29 20 3e 20 30 20 8c  |1-.(flag1) > 0 .|
000007c0  20 f1 22 2c 22 27 22 86  62 75 74 20 66 69 6c 65  | .","'".but file|
000007d0  20 73 69 7a 65 73 20 61  72 65 20 64 69 66 66 65  | sizes are diffe|
000007e0  72 65 6e 74 2e 22 20 8b  20 f1 0d 02 26 07 d9 23  |rent." . ...&..#|
000007f0  30 0d 02 30 13 ef 32 33  2c 31 2c 31 3b 30 3b 30  |0..0..23,1,1;0;0|
00000800  3b 30 3b 33 0d 02 3a 1e  f1 27 22 83 41 6e 6f 74  |;0;3..:..'".Anot|
00000810  68 65 72 20 50 61 69 72  3f 85 28 59 2f 4e 29 87  |her Pair?.(Y/N).|
00000820  22 3b 0d 02 44 1c e7 20  28 a5 20 80 20 26 44 46  |";..D.. (. . &DF|
00000830  29 3d 97 22 59 22 20 8c  20 e5 8d 44 78 40 0d 02  |)=."Y" . ..Dx@..|
00000840  4e 16 f1 22 4e 6f 22 27  3a ef 32 36 2c 33 31 2c  |N.."No"':.26,31,|
00000850  30 2c 32 34 0d 02 58 05  e0 0d 02 62 05 20 0d 02  |0,24..X....b. ..|
00000860  6c 15 dd f2 6e 6f 74 66  6f 75 6e 64 28 66 69 6c  |l...notfound(fil|
00000870  65 24 29 0d 02 76 20 f1  27 22 86 46 69 6c 65 87  |e$)..v .'".File.|
00000880  22 66 69 6c 65 24 22 86  6e 6f 74 20 66 6f 75 6e  |"file$".not foun|
00000890  64 2e 22 0d 02 80 07 d9  23 30 0d 02 8a 21 f1 27  |d.".....#0...!.'|
000008a0  22 83 50 72 65 73 73 20  61 20 6b 65 79 20 74 6f  |".Press a key to|
000008b0  20 72 65 2d 73 74 61 72  74 22 3b 0d 02 94 1a e7  | re-start";.....|
000008c0  20 a5 3d 97 22 2a 22 20  8c 20 2a 46 58 31 33 38  | .=."*" . *FX138|
000008d0  2c 30 2c 34 32 0d 02 9e  05 e1 0d 02 a8 05 20 0d  |,0,42......... .|
000008e0  02 b2 0a dd f2 64 69 66  66 0d 02 bc 10 e7 20 70  |.....diff..... p|
000008f0  66 6c 61 67 20 8c 20 ef  32 0d 02 c6 12 e3 20 5a  |flag . .2..... Z|
00000900  25 3d 4b 25 20 b8 20 4b  25 2b 33 0d 02 d0 14 e7  |%=K% . K%+3.....|
00000910  20 5a 25 3e 6c 69 6d 25  20 8c 20 8d 64 78 42 0d  | Z%>lim% . .dxB.|
00000920  02 da 15 e7 20 66 6c 61  67 33 3d a3 20 8c 20 f2  |.... flag3=. . .|
00000930  6e 61 6d 65 0d 02 e4 7d  e7 20 5a 25 3f 4d 25 20  |name...}. Z%?M% |
00000940  2d 20 5a 25 3f 4e 25 20  8c 20 f1 27 22 44 69 66  |- Z%?N% . .'"Dif|
00000950  66 65 72 65 6e 63 65 20  61 74 20 26 22 3b 7e 49  |ference at &";~I|
00000960  25 2a 72 6f 6f 6d 25 2b  5a 25 3b 8a 32 32 29 22  |%*room%+Z%;.22)"|
00000970  26 22 3b c2 22 30 22 2b  c3 7e 5a 25 3f 4d 25 2c  |&";."0"+.~Z%?M%,|
00000980  32 29 3b 8a 32 39 29 22  26 22 3b c2 22 30 22 2b  |2);.29)"&";."0"+|
00000990  c3 7e 5a 25 3f 4e 25 2c  32 29 3b 3a 66 6c 61 67  |.~Z%?N%,2);:flag|
000009a0  31 3d 66 6c 61 67 31 2b  31 3a 66 6c 61 67 32 3d  |1=flag1+1:flag2=|
000009b0  b9 0d 02 ee 0b 66 6c 61  67 33 3d b9 0d 02 f8 05  |.....flag3=.....|
000009c0  ed 0d 03 02 06 ef 33 0d  03 0c 05 e1 0d 03 16 05  |......3.........|
000009d0  20 0d 03 20 0a dd f2 6e  61 6d 65 0d 03 2a 1d 41  | .. ...name..*.A|
000009e0  25 3d a9 28 41 66 69 6c  65 24 29 3a 42 25 3d a9  |%=.(Afile$):B%=.|
000009f0  28 42 66 69 6c 65 24 29  0d 03 34 36 f1 27 22 83  |(Bfile$)..46.'".|
00000a00  22 8a 32 36 2d 41 25 2b  28 41 25 3c 32 29 2b 28  |".26-A%+(A%<2)+(|
00000a10  41 25 3c 34 29 2d 28 28  42 25 3c 37 29 80 28 41  |A%<4)-((B%<7).(A|
00000a20  25 3e 36 29 29 29 3b 41  66 69 6c 65 24 3b 0d 03  |%>6)));Afile$;..|
00000a30  3e 26 f1 8a 33 30 2b 28  42 25 3e 32 29 2b 28 42  |>&..30+(B%>2)+(B|
00000a40  25 3e 34 29 2b 28 42 25  3e 36 29 29 3b 42 66 69  |%>4)+(B%>6));Bfi|
00000a50  6c 65 24 3b 0d 03 48 05  e1 0d 03 52 05 20 0d 03  |le$;..H....R. ..|
00000a60  5c 0a dd f2 6c 6f 61 64  0d 03 66 9a f4 22 81 49  |\...load..f..".I|
00000a70  66 20 66 69 6c 65 73 20  61 72 65 20 73 6d 61 6c  |f files are smal|
00000a80  6c 65 72 20 74 68 61 6e  20 74 68 65 20 81 6d 61  |ler than the .ma|
00000a90  78 69 6d 75 6d 20 73 69  7a 65 20 74 68 61 74 20  |ximum size that |
00000aa0  63 61 6e 20 62 65 20 63  68 65 63 6b 65 64 20 69  |can be checked i|
00000ab0  6e 20 20 20 20 81 6f 6e  65 20 67 6f 2c 20 74 68  |n    .one go, th|
00000ac0  65 6e 20 2a 4c 4f 41 44  20 74 68 65 6d 2c 20 65  |en *LOAD them, e|
00000ad0  6c 73 65 20 75 73 65 20  20 20 20 20 20 81 4f 53  |lse use      .OS|
00000ae0  47 42 50 42 20 74 6f 20  6c 6f 61 64 20 69 6e 20  |GBPB to load in |
00000af0  65 61 63 68 20 63 68 75  6e 6b 20 28 72 6f 6f 6d  |each chunk (room|
00000b00  25 29 0d 03 70 1c 58 25  3d 70 61 72 61 6d 73 3a  |%)..p.X%=params:|
00000b10  59 25 3d 58 25 81 32 35  36 3a 41 25 3d 34 0d 03  |Y%=X%.256:A%=4..|
00000b20  7a 68 e7 20 65 78 74 25  3c 3d 72 6f 6f 6d 25 20  |zh. ext%<=room% |
00000b30  8c 20 f1 27 bd 31 31 22  86 4c 6f 61 64 69 6e 67  |. .'.11".Loading|
00000b40  83 22 3b 41 66 69 6c 65  24 3b 8a 33 39 29 3b 20  |.";Afile$;.39); |
00000b50  8b 20 f1 27 bd 31 31 22  86 4c 6f 61 64 69 6e 67  |. .'.11".Loading|
00000b60  20 63 68 75 6e 6b 20 6e  6f 2e 22 3b 49 25 2b 31  | chunk no.";I%+1|
00000b70  3b 22 20 66 72 6f 6d 83  22 3b 41 66 69 6c 65 24  |;" from.";Afile$|
00000b80  3b 8a 33 39 29 3b 0d 03  84 5f e7 20 41 73 69 7a  |;.39);..._. Asiz|
00000b90  65 25 3c 3d 72 6f 6f 6d  25 20 8c 20 f2 6f 73 63  |e%<=room% . .osc|
00000ba0  6c 69 28 22 4c 4f 41 44  20 22 2b 41 66 69 6c 65  |li("LOAD "+Afile|
00000bb0  24 2b 22 20 22 2b c3 7e  4d 25 29 20 8b 20 3f 58  |$+" "+.~M%) . ?X|
00000bc0  25 3d 41 68 61 6e 64 6c  65 25 3a 58 25 21 31 3d  |%=Ahandle%:X%!1=|
00000bd0  4d 25 3a 58 25 21 35 3d  6c 69 6d 25 2b 31 3a d6  |M%:X%!5=lim%+1:.|
00000be0  26 46 46 44 31 0d 03 8e  11 6c 69 6d 25 21 28 4d  |&FFD1....lim%!(M|
00000bf0  25 2b 31 29 3d 30 0d 03  98 68 e7 20 65 78 74 25  |%+1)=0...h. ext%|
00000c00  3c 3d 72 6f 6f 6d 25 20  8c 20 f1 27 bd 31 31 22  |<=room% . .'.11"|
00000c10  86 4c 6f 61 64 69 6e 67  83 22 3b 42 66 69 6c 65  |.Loading.";Bfile|
00000c20  24 3b 8a 33 39 29 3b 20  8b 20 f1 27 bd 31 31 22  |$;.39); . .'.11"|
00000c30  86 4c 6f 61 64 69 6e 67  20 63 68 75 6e 6b 20 6e  |.Loading chunk n|
00000c40  6f 2e 22 3b 49 25 2b 31  3b 22 20 66 72 6f 6d 83  |o.";I%+1;" from.|
00000c50  22 3b 42 66 69 6c 65 24  3b 8a 33 39 29 3b 0d 03  |";Bfile$;.39);..|
00000c60  a2 5f e7 20 42 73 69 7a  65 25 3c 3d 72 6f 6f 6d  |._. Bsize%<=room|
00000c70  25 20 8c 20 f2 6f 73 63  6c 69 28 22 4c 4f 41 44  |% . .oscli("LOAD|
00000c80  20 22 2b 42 66 69 6c 65  24 2b 22 20 22 2b c3 7e  | "+Bfile$+" "+.~|
00000c90  4e 25 29 20 8b 20 3f 58  25 3d 42 68 61 6e 64 6c  |N%) . ?X%=Bhandl|
00000ca0  65 25 3a 58 25 21 31 3d  4e 25 3a 58 25 21 35 3d  |e%:X%!1=N%:X%!5=|
00000cb0  6c 69 6d 25 2b 31 3a d6  26 46 46 44 31 0d 03 ac  |lim%+1:.&FFD1...|
00000cc0  11 6c 69 6d 25 21 28 4e  25 2b 31 29 3d 30 0d 03  |.lim%!(N%+1)=0..|
00000cd0  b6 0e f1 bd 31 33 3b 8a  33 39 29 3b 0d 03 c0 05  |....13;.39);....|
00000ce0  e1 0d 03 ca 05 20 0d 03  d4 0d dd f2 63 6f 6d 6d  |..... ......comm|
00000cf0  61 6e 64 0d 03 de 12 ef  32 33 2c 31 2c 30 3b 30  |and.....23,1,0;0|
00000d00  3b 30 3b 30 3b 0d 03 e8  05 db 0d 03 f2 12 f2 6f  |;0;0;..........o|
00000d10  73 63 6c 69 28 41 66 69  6c 65 24 29 0d 03 fc 26  |scli(Afile$)...&|
00000d20  f1 8a 37 2c 32 31 29 22  83 50 72 65 73 73 20 61  |..7,21)".Press a|
00000d30  20 6b 65 79 20 74 6f 20  63 6f 6e 74 69 6e 75 65  | key to continue|
00000d40  22 3b 0d 04 06 1a e7 20  a5 3d 97 22 2a 22 20 8c  |";..... .=."*" .|
00000d50  20 2a 46 58 31 33 38 2c  30 2c 34 32 0d 04 10 05  | *FX138,0,42....|
00000d60  db 0d 04 1a 12 ef 32 33  2c 31 2c 31 3b 30 3b 30  |......23,1,1;0;0|
00000d70  3b 30 3b 0d 04 24 05 e1  0d 04 2e 05 20 0d 04 38  |;0;..$...... ..8|
00000d80  15 dd f2 6f 73 63 6c 69  28 63 6f 6d 6d 61 6e 64  |...oscli(command|
00000d90  24 29 0d 04 42 14 24 70  61 72 61 6d 73 3d 63 6f  |$)..B.$params=co|
00000da0  6d 6d 61 6e 64 24 0d 04  4c 17 58 25 3d 70 61 72  |mmand$..L.X%=par|
00000db0  61 6d 73 3a 59 25 3d 58  25 81 32 35 36 0d 04 56  |ams:Y%=X%.256..V|
00000dc0  0a d6 26 46 46 46 37 0d  04 60 05 e1 0d 04 6a 05  |..&FFF7..`....j.|
00000dd0  20 0d 04 74 14 f4 22 81  45 72 72 6f 72 20 72 6f  | ..t..".Error ro|
00000de0  75 74 69 6e 65 0d 04 7e  07 d9 23 30 0d 04 88 11  |utine..~..#0....|
00000df0  f1 27 27 22 85 22 3b 3a  ef 31 38 3a f6 0d 04 92  |.''".";:.18:....|
00000e00  24 e7 20 9f 3d 31 37 20  8c 20 f1 22 64 22 27 20  |$. .=17 . ."d"' |
00000e10  8b 20 f1 22 20 61 74 20  6c 69 6e 65 20 22 3b 9e  |. ." at line ";.|
00000e20  27 0d 04 9c 21 ef 33 2c  32 36 2c 33 31 2c 30 2c  |'...!.3,26,31,0,|
00000e30  32 34 2c 37 2c 32 33 2c  31 2c 31 3b 30 3b 30 3b  |24,7,23,1,1;0;0;|
00000e40  30 3b 0d ff                                       |0;..|
00000e44
COMPARE.m0
COMPARE.m1
COMPARE.m2
COMPARE.m4
COMPARE.m5