Home » Archimedes archive » Acorn User » AU 1995-06.adf » !StarInfo_StarInfo » Compare/CompareS
Compare/CompareS
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 » Archimedes archive » Acorn User » AU 1995-06.adf » !StarInfo_StarInfo |
Filename: | Compare/CompareS |
Read OK: | ✔ |
File size: | 132F bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >CompareS 20REM By Dave Lawrence 30REM (c) March 1995 40: 50max=256 60: 70DIM code 800 80wp=12:sp=13:lr=14:pc=15 90arg_file1=0 100arg_file2=4 101arg_verbose=8 110FOR pass=0 TO 2 STEP 2:P%=code 120[OPT pass 130 STMFD sp !,{r0-r11,lr} 140 150 ADR r0,args 160 MOV r2,wp 170 MOV r3,#512 180 SWI "XOS_ReadArgs" 190 BVS Error 200 210 LDR r0,[wp,#arg_file1] 220 CMP r0,#0 230 ADREQ r0,syntax 240 BEQ Error 250 260 LDR r0,[wp,#arg_file2] 270 CMP r0,#0 280 ADREQ r0,syntax 290 BEQ Error 291 292 LDR r0,[wp,#arg_verbose] 293 CMP r0,#0 294 BEQ not_verbose 300 310 SWI "XOS_WriteS" 320 EQUS "File 1: " 330 EQUB 0 340 ALIGN 350 360 LDR r0,[wp,#arg_file1] 370 SWI 256+ASC"'" 380 SWI "XOS_Write0" 390 SWI 256+ASC"'" 400 SWI "XOS_NewLine" 410 411 SWI "XOS_WriteS" 420 EQUS "File 2: " 430 EQUB 0 440 ALIGN 450 460 LDR r0,[wp,#arg_file2] 480 SWI 256+ASC"'" 490 SWI "XOS_Write0" 500 SWI 256+ASC"'" 510 SWI "XOS_NewLine" 520 SWI "XOS_NewLine" 530.not_verbose 540 MOV r0,#5 550 LDR r1,[wp,#arg_file1] 560 SWI "XOS_File" 570 BVS Error 580 CMP r0,#1 590 BNE no_file 600 MOV r9,r4 610 620 MOV r0,#5 630 LDR r1,[wp,#arg_file2] 640 SWI "XOS_File" 650 BVS Error 660 CMP r0,#1 670 BNE no_file 680 690 CMP r4,r9 700 ADRNE r0,different_lengths 710 BNE Error 720 730 MOV r0,#&40 740 LDR r1,[wp,#arg_file1] 750 SWI "XOS_Find" 760 BVS close_Error 770 CMP r0,#0 780 BEQ close_Error 790 STR r0,handle1 800 810 MOV r0,#&40 820 LDR r1,[wp,#arg_file2] 830 SWI "XOS_Find" 840 BVS close_Error 850 CMP r0,#0 860 BEQ close_Error 870 STR r0,handle2 880 890 MOV r7,#0 900.check_loop 910 ; r9 bytes remain to check... 920 MOV r8,r9 930 CMP r8,#max 940 MOVGT r8,#max 950 960 MOV r10,wp 970 ADD r11,wp,#max 980 990 MOV r0,#4 ; read bytes from current 1000 LDR r1,handle1 1010 MOV r2,r10 1020 MOV r3,r8 1030 SWI "XOS_GBPB" 1040 BVS close_Error 1050 1060 MOV r0,#4 ; read bytes from current 1070 LDR r1,handle2 1080 MOV r2,r11 1090 MOV r3,r8 1100 SWI "XOS_GBPB" 1110 BVS close_Error 1120 1130 MOV r6,r8 1140.do_compare 1150 LDRB r0,[r10],#1 1160 LDRB r1,[r11],#1 1170 CMP r0,r1 1180 ADDNE r7,r7,#1 1190 SUBS r6,r6,#1 1200 BGT do_compare 1210 1220 SUBS r9,r9,r8 1230 BGT check_loop 1240 1250 BL close_files 1260 1270 MOV r0,r7 1280 ADR r1,differences 1290 MOV r2,#10 1300 SWI "XOS_ConvertCardinal4" 1310 1320 CMP r7,#0 1330 ADREQ r0,files_same 1340 ADRNE r0,files_different 1350 1360 SWI "XOS_Write0" 1370 SWI "XOS_NewLine" 1380 1390.Exit LDMFD sp !,{r0-r11,pc} 1400 1410.handle1 EQUD 0 1420.handle2 EQUD 0 1430 1440.files_same 1450 EQUS "Files identical":EQUB 0 1460 ALIGN 1470 1480.files_different 1490 EQUS "Differences: " 1500.differences 1510 EQUS "1234567890" 1520 ALIGN 1530 1540.no_file 1550 MOV r2,r0 1560 MOV r0,#19 1570 SWI "XOS_File" 1580 B Error 1590 1600.close_files 1610 STMFD sp !,{r0-r1,lr} 1620 LDR r1,handle1 1630 CMP r1,#0 1640 MOVNE r0,#0 1650 SWINE "XOS_Find" 1660 1670 LDR r1,handle2 1680 CMP r1,#0 1690 MOVNE r0,#0 1700 SWINE "XOS_Find" 1710 LDMFD sp !,{r0-r1,pc}^ 1720 1730.close_Error 1740 BL close_files 1750 ; 1760.Error ADD sp,sp,#4 1770 LDMFD sp !,{r1-r11,lr} 1780 ORRS pc,lr,#1<<28 1790 1800.syntax 1810 EQUD 220 1820 EQUS "Syntax: *Compare <file1> <file2>" 1830 EQUB 0 1840 ALIGN 1850.different_lengths 1860 EQUD 17 1870 EQUS "Files are different lengths" 1880 EQUB 0 1890 ALIGN 1900.args 1910 EQUS ",,verbose/s" 1920 EQUB 0 1930 ALIGN 1940]NEXT 1950SYS "OS_File",10,"%.Compare",&FFC,,code,P% 1960END
� >CompareS � By Dave Lawrence � (c) March 1995 (: 2max=256 <: F� code 800 Pwp=12:sp=13:lr=14:pc=15 Zarg_file1=0 darg_file2=4 earg_verbose=8 n� pass=0 � 2 � 2:P%=code x [OPT pass �$ STMFD sp !,{r0-r11,lr} � � ADR r0,args � MOV r2,wp � MOV r3,#512 �" SWI "XOS_ReadArgs" � BVS Error � �& LDR r0,[wp,#arg_file1] � CMP r0,#0 � ADREQ r0,syntax � BEQ Error � & LDR r0,[wp,#arg_file2] CMP r0,#0 ADREQ r0,syntax " BEQ Error # $( LDR r0,[wp,#arg_verbose] % CMP r0,#0 & BEQ not_verbose , 6 SWI "XOS_WriteS" @ EQUS "File 1: " J EQUB 0 T ALIGN ^ h& LDR r0,[wp,#arg_file1] r SWI 256+�"'" | SWI "XOS_Write0" � SWI 256+�"'" �! SWI "XOS_NewLine" � � SWI "XOS_WriteS" � EQUS "File 2: " � EQUB 0 � ALIGN � �& LDR r0,[wp,#arg_file2] � SWI 256+�"'" � SWI "XOS_Write0" � SWI 256+�"'" �! SWI "XOS_NewLine" ! SWI "XOS_NewLine" .not_verbose MOV r0,#5 && LDR r1,[wp,#arg_file1] 0 SWI "XOS_File" : BVS Error D CMP r0,#1 N BNE no_file X MOV r9,r4 b l MOV r0,#5 v& LDR r1,[wp,#arg_file2] � SWI "XOS_File" � BVS Error � CMP r0,#1 � BNE no_file � � CMP r4,r9 �( ADRNE r0,different_lengths � BNE Error � � MOV r0,#&40 �& LDR r1,[wp,#arg_file1] � SWI "XOS_Find" � BVS close_Error CMP r0,#0 BEQ close_Error STR r0,handle1 * MOV r0,#&40 4& LDR r1,[wp,#arg_file2] > SWI "XOS_Find" H BVS close_Error R CMP r0,#0 \ BEQ close_Error f STR r0,handle2 p z MOV r7,#0 �.check_loop �) ; r9 bytes remain to check... � MOV r8,r9 � CMP r8,#max � MOVGT r8,#max � � MOV r10,wp � ADD r11,wp,#max � �3 MOV r0,#4 ; read bytes from current � LDR r1,handle1 � MOV r2,r10 � MOV r3,r8 SWI "XOS_GBPB" BVS close_Error $3 MOV r0,#4 ; read bytes from current . LDR r1,handle2 8 MOV r2,r11 B MOV r3,r8 L SWI "XOS_GBPB" V BVS close_Error ` j MOV r6,r8 t.do_compare ~ LDRB r0,[r10],#1 � LDRB r1,[r11],#1 � CMP r0,r1 � ADDNE r7,r7,#1 � SUBS r6,r6,#1 � BGT do_compare � � SUBS r9,r9,r8 � BGT check_loop � � BL close_files � � MOV r0,r7 " ADR r1,differences MOV r2,#10 * SWI "XOS_ConvertCardinal4" ( CMP r7,#0 2! ADREQ r0,files_same <& ADRNE r0,files_different F P SWI "XOS_Write0" Z! SWI "XOS_NewLine" d n$.Exit LDMFD sp !,{r0-r11,pc} x �.handle1 EQUD 0 �.handle2 EQUD 0 � �.files_same �, EQUS "Files identical":EQUB 0 � ALIGN � �.files_different �# EQUS "Differences: " �.differences � EQUS "1234567890" � ALIGN � .no_file MOV r2,r0 MOV r0,#19 " SWI "XOS_File" , B Error 6 @.close_files J# STMFD sp !,{r0-r1,lr} T LDR r1,handle1 ^ CMP r1,#0 h MOVNE r0,#0 r SWINE "XOS_Find" | � LDR r1,handle2 � CMP r1,#0 � MOVNE r0,#0 � SWINE "XOS_Find" �$ LDMFD sp !,{r0-r1,pc}^ � �.close_Error � BL close_files � ; �.Error ADD sp,sp,#4 �$ LDMFD sp !,{r1-r11,lr} � �RS pc,lr,#1<<28 � .syntax EQUD 220 6 EQUS "Syntax: *Compare <file1> <file2>" & EQUB 0 0 ALIGN :.different_lengths D EQUD 17 N1 EQUS "Files are different lengths" X EQUB 0 b ALIGN l .args v! EQUS ",,verbose/s" � EQUB 0 � ALIGN �]� �-ș "OS_File",10,"%.Compare",&FFC,,code,P% �� �
00000000 0d 00 0a 0f f4 20 3e 43 6f 6d 70 61 72 65 53 0d |..... >CompareS.| 00000010 00 14 16 f4 20 42 79 20 44 61 76 65 20 4c 61 77 |.... By Dave Law| 00000020 72 65 6e 63 65 0d 00 1e 14 f4 20 28 63 29 20 4d |rence..... (c) M| 00000030 61 72 63 68 20 31 39 39 35 0d 00 28 05 3a 0d 00 |arch 1995..(.:..| 00000040 32 0b 6d 61 78 3d 32 35 36 0d 00 3c 05 3a 0d 00 |2.max=256..<.:..| 00000050 46 0e de 20 63 6f 64 65 20 38 30 30 0d 00 50 1b |F.. code 800..P.| 00000060 77 70 3d 31 32 3a 73 70 3d 31 33 3a 6c 72 3d 31 |wp=12:sp=13:lr=1| 00000070 34 3a 70 63 3d 31 35 0d 00 5a 0f 61 72 67 5f 66 |4:pc=15..Z.arg_f| 00000080 69 6c 65 31 3d 30 0d 00 64 0f 61 72 67 5f 66 69 |ile1=0..d.arg_fi| 00000090 6c 65 32 3d 34 0d 00 65 11 61 72 67 5f 76 65 72 |le2=4..e.arg_ver| 000000a0 62 6f 73 65 3d 38 0d 00 6e 1c e3 20 70 61 73 73 |bose=8..n.. pass| 000000b0 3d 30 20 b8 20 32 20 88 20 32 3a 50 25 3d 63 6f |=0 . 2 . 2:P%=co| 000000c0 64 65 0d 00 78 0d 5b 4f 50 54 20 70 61 73 73 0d |de..x.[OPT pass.| 000000d0 00 82 24 20 20 20 20 20 20 20 20 53 54 4d 46 44 |..$ STMFD| 000000e0 20 20 20 73 70 20 21 2c 7b 72 30 2d 72 31 31 2c | sp !,{r0-r11,| 000000f0 6c 72 7d 0d 00 8c 0c 20 20 20 20 20 20 20 20 0d |lr}.... .| 00000100 00 96 1b 20 20 20 20 20 20 20 20 41 44 52 20 20 |... ADR | 00000110 20 20 20 72 30 2c 61 72 67 73 0d 00 a0 19 20 20 | r0,args.... | 00000120 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 32 | MOV r2| 00000130 2c 77 70 0d 00 aa 1b 20 20 20 20 20 20 20 20 4d |,wp.... M| 00000140 4f 56 20 20 20 20 20 72 33 2c 23 35 31 32 0d 00 |OV r3,#512..| 00000150 b4 22 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |." SWI | 00000160 20 20 22 58 4f 53 5f 52 65 61 64 41 72 67 73 22 | "XOS_ReadArgs"| 00000170 0d 00 be 19 20 20 20 20 20 20 20 20 42 56 53 20 |.... BVS | 00000180 20 20 20 20 45 72 72 6f 72 0d 00 c8 04 0d 00 d2 | Error.......| 00000190 26 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |& LDR | 000001a0 20 72 30 2c 5b 77 70 2c 23 61 72 67 5f 66 69 6c | r0,[wp,#arg_fil| 000001b0 65 31 5d 0d 00 dc 19 20 20 20 20 20 20 20 20 43 |e1].... C| 000001c0 4d 50 20 20 20 20 20 72 30 2c 23 30 0d 00 e6 1d |MP r0,#0....| 000001d0 20 20 20 20 20 20 20 20 41 44 52 45 51 20 20 20 | ADREQ | 000001e0 72 30 2c 73 79 6e 74 61 78 0d 00 f0 19 20 20 20 |r0,syntax.... | 000001f0 20 20 20 20 20 42 45 51 20 20 20 20 20 45 72 72 | BEQ Err| 00000200 6f 72 0d 00 fa 0c 20 20 20 20 20 20 20 20 0d 01 |or.... ..| 00000210 04 26 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 |.& LDR | 00000220 20 20 72 30 2c 5b 77 70 2c 23 61 72 67 5f 66 69 | r0,[wp,#arg_fi| 00000230 6c 65 32 5d 0d 01 0e 19 20 20 20 20 20 20 20 20 |le2].... | 00000240 43 4d 50 20 20 20 20 20 72 30 2c 23 30 0d 01 18 |CMP r0,#0...| 00000250 1d 20 20 20 20 20 20 20 20 41 44 52 45 51 20 20 |. ADREQ | 00000260 20 72 30 2c 73 79 6e 74 61 78 0d 01 22 19 20 20 | r0,syntax..". | 00000270 20 20 20 20 20 20 42 45 51 20 20 20 20 20 45 72 | BEQ Er| 00000280 72 6f 72 0d 01 23 0c 20 20 20 20 20 20 20 20 0d |ror..#. .| 00000290 01 24 28 20 20 20 20 20 20 20 20 4c 44 52 20 20 |.$( LDR | 000002a0 20 20 20 72 30 2c 5b 77 70 2c 23 61 72 67 5f 76 | r0,[wp,#arg_v| 000002b0 65 72 62 6f 73 65 5d 0d 01 25 19 20 20 20 20 20 |erbose]..%. | 000002c0 20 20 20 43 4d 50 20 20 20 20 20 72 30 2c 23 30 | CMP r0,#0| 000002d0 0d 01 26 1f 20 20 20 20 20 20 20 20 42 45 51 20 |..&. BEQ | 000002e0 20 20 20 20 6e 6f 74 5f 76 65 72 62 6f 73 65 0d | not_verbose.| 000002f0 01 2c 0c 20 20 20 20 20 20 20 20 0d 01 36 20 20 |.,. ..6 | 00000300 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 22 | SWI "| 00000310 58 4f 53 5f 57 72 69 74 65 53 22 0d 01 40 1e 20 |XOS_WriteS"..@. | 00000320 20 20 20 20 20 20 20 45 51 55 53 20 20 20 20 22 | EQUS "| 00000330 46 69 6c 65 20 31 3a 20 22 0d 01 4a 15 20 20 20 |File 1: "..J. | 00000340 20 20 20 20 20 45 51 55 42 20 20 20 20 30 0d 01 | EQUB 0..| 00000350 54 11 20 20 20 20 20 20 20 20 41 4c 49 47 4e 0d |T. ALIGN.| 00000360 01 5e 0c 20 20 20 20 20 20 20 20 0d 01 68 26 20 |.^. ..h& | 00000370 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 00000380 30 2c 5b 77 70 2c 23 61 72 67 5f 66 69 6c 65 31 |0,[wp,#arg_file1| 00000390 5d 0d 01 72 1c 20 20 20 20 20 20 20 20 53 57 49 |]..r. SWI| 000003a0 20 20 20 20 20 32 35 36 2b 97 22 27 22 0d 01 7c | 256+."'"..|| 000003b0 20 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 | SWI | 000003c0 20 22 58 4f 53 5f 57 72 69 74 65 30 22 0d 01 86 | "XOS_Write0"...| 000003d0 1c 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 |. SWI | 000003e0 20 32 35 36 2b 97 22 27 22 0d 01 90 21 20 20 20 | 256+."'"...! | 000003f0 20 20 20 20 20 53 57 49 20 20 20 20 20 22 58 4f | SWI "XO| 00000400 53 5f 4e 65 77 4c 69 6e 65 22 0d 01 9a 0c 20 20 |S_NewLine".... | 00000410 20 20 20 20 20 20 0d 01 9b 20 20 20 20 20 20 20 | ... | 00000420 20 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f 57 | SWI "XOS_W| 00000430 72 69 74 65 53 22 0d 01 a4 1e 20 20 20 20 20 20 |riteS".... | 00000440 20 20 45 51 55 53 20 20 20 20 22 46 69 6c 65 20 | EQUS "File | 00000450 32 3a 20 22 0d 01 ae 15 20 20 20 20 20 20 20 20 |2: ".... | 00000460 45 51 55 42 20 20 20 20 30 0d 01 b8 11 20 20 20 |EQUB 0.... | 00000470 20 20 20 20 20 41 4c 49 47 4e 0d 01 c2 0c 20 20 | ALIGN.... | 00000480 20 20 20 20 20 20 0d 01 cc 26 20 20 20 20 20 20 | ...& | 00000490 20 20 4c 44 52 20 20 20 20 20 72 30 2c 5b 77 70 | LDR r0,[wp| 000004a0 2c 23 61 72 67 5f 66 69 6c 65 32 5d 0d 01 e0 1c |,#arg_file2]....| 000004b0 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 000004c0 32 35 36 2b 97 22 27 22 0d 01 ea 20 20 20 20 20 |256+."'"... | 000004d0 20 20 20 20 53 57 49 20 20 20 20 20 22 58 4f 53 | SWI "XOS| 000004e0 5f 57 72 69 74 65 30 22 0d 01 f4 1c 20 20 20 20 |_Write0".... | 000004f0 20 20 20 20 53 57 49 20 20 20 20 20 32 35 36 2b | SWI 256+| 00000500 97 22 27 22 0d 01 fe 21 20 20 20 20 20 20 20 20 |."'"...! | 00000510 53 57 49 20 20 20 20 20 22 58 4f 53 5f 4e 65 77 |SWI "XOS_New| 00000520 4c 69 6e 65 22 0d 02 08 21 20 20 20 20 20 20 20 |Line"...! | 00000530 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f 4e 65 | SWI "XOS_Ne| 00000540 77 4c 69 6e 65 22 0d 02 12 18 2e 6e 6f 74 5f 76 |wLine".....not_v| 00000550 65 72 62 6f 73 65 20 20 20 20 20 20 20 20 0d 02 |erbose ..| 00000560 1c 19 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |.. MOV | 00000570 20 20 72 30 2c 23 35 0d 02 26 26 20 20 20 20 20 | r0,#5..&& | 00000580 20 20 20 4c 44 52 20 20 20 20 20 72 31 2c 5b 77 | LDR r1,[w| 00000590 70 2c 23 61 72 67 5f 66 69 6c 65 31 5d 0d 02 30 |p,#arg_file1]..0| 000005a0 1e 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 |. SWI | 000005b0 20 22 58 4f 53 5f 46 69 6c 65 22 0d 02 3a 19 20 | "XOS_File"..:. | 000005c0 20 20 20 20 20 20 20 42 56 53 20 20 20 20 20 45 | BVS E| 000005d0 72 72 6f 72 0d 02 44 19 20 20 20 20 20 20 20 20 |rror..D. | 000005e0 43 4d 50 20 20 20 20 20 72 30 2c 23 31 0d 02 4e |CMP r0,#1..N| 000005f0 1b 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |. BNE | 00000600 20 6e 6f 5f 66 69 6c 65 0d 02 58 19 20 20 20 20 | no_file..X. | 00000610 20 20 20 20 4d 4f 56 20 20 20 20 20 72 39 2c 72 | MOV r9,r| 00000620 34 0d 02 62 0c 20 20 20 20 20 20 20 20 0d 02 6c |4..b. ..l| 00000630 19 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00000640 20 72 30 2c 23 35 0d 02 76 26 20 20 20 20 20 20 | r0,#5..v& | 00000650 20 20 4c 44 52 20 20 20 20 20 72 31 2c 5b 77 70 | LDR r1,[wp| 00000660 2c 23 61 72 67 5f 66 69 6c 65 32 5d 0d 02 80 1e |,#arg_file2]....| 00000670 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 00000680 22 58 4f 53 5f 46 69 6c 65 22 0d 02 8a 19 20 20 |"XOS_File".... | 00000690 20 20 20 20 20 20 42 56 53 20 20 20 20 20 45 72 | BVS Er| 000006a0 72 6f 72 0d 02 94 19 20 20 20 20 20 20 20 20 43 |ror.... C| 000006b0 4d 50 20 20 20 20 20 72 30 2c 23 31 0d 02 9e 1b |MP r0,#1....| 000006c0 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 | BNE | 000006d0 6e 6f 5f 66 69 6c 65 0d 02 a8 0c 20 20 20 20 20 |no_file.... | 000006e0 20 20 20 0d 02 b2 19 20 20 20 20 20 20 20 20 43 | .... C| 000006f0 4d 50 20 20 20 20 20 72 34 2c 72 39 0d 02 bc 28 |MP r4,r9...(| 00000700 20 20 20 20 20 20 20 20 41 44 52 4e 45 20 20 20 | ADRNE | 00000710 72 30 2c 64 69 66 66 65 72 65 6e 74 5f 6c 65 6e |r0,different_len| 00000720 67 74 68 73 0d 02 c6 19 20 20 20 20 20 20 20 20 |gths.... | 00000730 42 4e 45 20 20 20 20 20 45 72 72 6f 72 0d 02 d0 |BNE Error...| 00000740 0c 20 20 20 20 20 20 20 20 0d 02 da 1b 20 20 20 |. .... | 00000750 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c | MOV r0,| 00000760 23 26 34 30 0d 02 e4 26 20 20 20 20 20 20 20 20 |#&40...& | 00000770 4c 44 52 20 20 20 20 20 72 31 2c 5b 77 70 2c 23 |LDR r1,[wp,#| 00000780 61 72 67 5f 66 69 6c 65 31 5d 0d 02 ee 1e 20 20 |arg_file1].... | 00000790 20 20 20 20 20 20 53 57 49 20 20 20 20 20 22 58 | SWI "X| 000007a0 4f 53 5f 46 69 6e 64 22 0d 02 f8 1f 20 20 20 20 |OS_Find".... | 000007b0 20 20 20 20 42 56 53 20 20 20 20 20 63 6c 6f 73 | BVS clos| 000007c0 65 5f 45 72 72 6f 72 0d 03 02 19 20 20 20 20 20 |e_Error.... | 000007d0 20 20 20 43 4d 50 20 20 20 20 20 72 30 2c 23 30 | CMP r0,#0| 000007e0 0d 03 0c 1f 20 20 20 20 20 20 20 20 42 45 51 20 |.... BEQ | 000007f0 20 20 20 20 63 6c 6f 73 65 5f 45 72 72 6f 72 0d | close_Error.| 00000800 03 16 1e 20 20 20 20 20 20 20 20 53 54 52 20 20 |... STR | 00000810 20 20 20 72 30 2c 68 61 6e 64 6c 65 31 0d 03 20 | r0,handle1.. | 00000820 0c 20 20 20 20 20 20 20 20 0d 03 2a 1b 20 20 20 |. ..*. | 00000830 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c | MOV r0,| 00000840 23 26 34 30 0d 03 34 26 20 20 20 20 20 20 20 20 |#&40..4& | 00000850 4c 44 52 20 20 20 20 20 72 31 2c 5b 77 70 2c 23 |LDR r1,[wp,#| 00000860 61 72 67 5f 66 69 6c 65 32 5d 0d 03 3e 1e 20 20 |arg_file2]..>. | 00000870 20 20 20 20 20 20 53 57 49 20 20 20 20 20 22 58 | SWI "X| 00000880 4f 53 5f 46 69 6e 64 22 0d 03 48 1f 20 20 20 20 |OS_Find"..H. | 00000890 20 20 20 20 42 56 53 20 20 20 20 20 63 6c 6f 73 | BVS clos| 000008a0 65 5f 45 72 72 6f 72 0d 03 52 19 20 20 20 20 20 |e_Error..R. | 000008b0 20 20 20 43 4d 50 20 20 20 20 20 72 30 2c 23 30 | CMP r0,#0| 000008c0 0d 03 5c 1f 20 20 20 20 20 20 20 20 42 45 51 20 |..\. BEQ | 000008d0 20 20 20 20 63 6c 6f 73 65 5f 45 72 72 6f 72 0d | close_Error.| 000008e0 03 66 1e 20 20 20 20 20 20 20 20 53 54 52 20 20 |.f. STR | 000008f0 20 20 20 72 30 2c 68 61 6e 64 6c 65 32 0d 03 70 | r0,handle2..p| 00000900 04 0d 03 7a 19 20 20 20 20 20 20 20 20 4d 4f 56 |...z. MOV| 00000910 20 20 20 20 20 72 37 2c 23 30 0d 03 84 0f 2e 63 | r7,#0.....c| 00000920 68 65 63 6b 5f 6c 6f 6f 70 0d 03 8e 29 20 20 20 |heck_loop...) | 00000930 20 20 20 20 20 3b 20 72 39 20 62 79 74 65 73 20 | ; r9 bytes | 00000940 72 65 6d 61 69 6e 20 74 6f 20 63 68 65 63 6b 2e |remain to check.| 00000950 2e 2e 0d 03 98 19 20 20 20 20 20 20 20 20 4d 4f |...... MO| 00000960 56 20 20 20 20 20 72 38 2c 72 39 0d 03 a2 1b 20 |V r8,r9.... | 00000970 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00000980 38 2c 23 6d 61 78 0d 03 ac 1b 20 20 20 20 20 20 |8,#max.... | 00000990 20 20 4d 4f 56 47 54 20 20 20 72 38 2c 23 6d 61 | MOVGT r8,#ma| 000009a0 78 0d 03 b6 0c 20 20 20 20 20 20 20 20 0d 03 c0 |x.... ...| 000009b0 1a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 000009c0 20 72 31 30 2c 77 70 0d 03 ca 1f 20 20 20 20 20 | r10,wp.... | 000009d0 20 20 20 41 44 44 20 20 20 20 20 72 31 31 2c 77 | ADD r11,w| 000009e0 70 2c 23 6d 61 78 0d 03 d4 0c 20 20 20 20 20 20 |p,#max.... | 000009f0 20 20 0d 03 de 33 20 20 20 20 20 20 20 20 4d 4f | ...3 MO| 00000a00 56 20 20 20 20 20 72 30 2c 23 34 20 3b 20 72 65 |V r0,#4 ; re| 00000a10 61 64 20 62 79 74 65 73 20 66 72 6f 6d 20 63 75 |ad bytes from cu| 00000a20 72 72 65 6e 74 0d 03 e8 1e 20 20 20 20 20 20 20 |rrent.... | 00000a30 20 4c 44 52 20 20 20 20 20 72 31 2c 68 61 6e 64 | LDR r1,hand| 00000a40 6c 65 31 0d 03 f2 1a 20 20 20 20 20 20 20 20 4d |le1.... M| 00000a50 4f 56 20 20 20 20 20 72 32 2c 72 31 30 0d 03 fc |OV r2,r10...| 00000a60 19 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00000a70 20 72 33 2c 72 38 0d 04 06 1e 20 20 20 20 20 20 | r3,r8.... | 00000a80 20 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f 47 | SWI "XOS_G| 00000a90 42 50 42 22 0d 04 10 1f 20 20 20 20 20 20 20 20 |BPB".... | 00000aa0 42 56 53 20 20 20 20 20 63 6c 6f 73 65 5f 45 72 |BVS close_Er| 00000ab0 72 6f 72 0d 04 1a 0c 20 20 20 20 20 20 20 20 0d |ror.... .| 00000ac0 04 24 33 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |.$3 MOV | 00000ad0 20 20 20 72 30 2c 23 34 20 3b 20 72 65 61 64 20 | r0,#4 ; read | 00000ae0 62 79 74 65 73 20 66 72 6f 6d 20 63 75 72 72 65 |bytes from curre| 00000af0 6e 74 0d 04 2e 1e 20 20 20 20 20 20 20 20 4c 44 |nt.... LD| 00000b00 52 20 20 20 20 20 72 31 2c 68 61 6e 64 6c 65 32 |R r1,handle2| 00000b10 0d 04 38 1a 20 20 20 20 20 20 20 20 4d 4f 56 20 |..8. MOV | 00000b20 20 20 20 20 72 32 2c 72 31 31 0d 04 42 19 20 20 | r2,r11..B. | 00000b30 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 33 | MOV r3| 00000b40 2c 72 38 0d 04 4c 1e 20 20 20 20 20 20 20 20 53 |,r8..L. S| 00000b50 57 49 20 20 20 20 20 22 58 4f 53 5f 47 42 50 42 |WI "XOS_GBPB| 00000b60 22 0d 04 56 1f 20 20 20 20 20 20 20 20 42 56 53 |"..V. BVS| 00000b70 20 20 20 20 20 63 6c 6f 73 65 5f 45 72 72 6f 72 | close_Error| 00000b80 0d 04 60 0c 20 20 20 20 20 20 20 20 0d 04 6a 19 |..`. ..j.| 00000b90 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00000ba0 72 36 2c 72 38 0d 04 74 0f 2e 64 6f 5f 63 6f 6d |r6,r8..t..do_com| 00000bb0 70 61 72 65 0d 04 7e 1f 20 20 20 20 20 20 20 20 |pare..~. | 00000bc0 4c 44 52 42 20 20 20 20 72 30 2c 5b 72 31 30 5d |LDRB r0,[r10]| 00000bd0 2c 23 31 0d 04 88 1f 20 20 20 20 20 20 20 20 4c |,#1.... L| 00000be0 44 52 42 20 20 20 20 72 31 2c 5b 72 31 31 5d 2c |DRB r1,[r11],| 00000bf0 23 31 0d 04 92 19 20 20 20 20 20 20 20 20 43 4d |#1.... CM| 00000c00 50 20 20 20 20 20 72 30 2c 72 31 0d 04 9c 1c 20 |P r0,r1.... | 00000c10 20 20 20 20 20 20 20 41 44 44 4e 45 20 20 20 72 | ADDNE r| 00000c20 37 2c 72 37 2c 23 31 0d 04 a6 1c 20 20 20 20 20 |7,r7,#1.... | 00000c30 20 20 20 53 55 42 53 20 20 20 20 72 36 2c 72 36 | SUBS r6,r6| 00000c40 2c 23 31 0d 04 b0 1e 20 20 20 20 20 20 20 20 42 |,#1.... B| 00000c50 47 54 20 20 20 20 20 64 6f 5f 63 6f 6d 70 61 72 |GT do_compar| 00000c60 65 0d 04 ba 0c 20 20 20 20 20 20 20 20 0d 04 c4 |e.... ...| 00000c70 1c 20 20 20 20 20 20 20 20 53 55 42 53 20 20 20 |. SUBS | 00000c80 20 72 39 2c 72 39 2c 72 38 0d 04 ce 1e 20 20 20 | r9,r9,r8.... | 00000c90 20 20 20 20 20 42 47 54 20 20 20 20 20 63 68 65 | BGT che| 00000ca0 63 6b 5f 6c 6f 6f 70 0d 04 d8 0c 20 20 20 20 20 |ck_loop.... | 00000cb0 20 20 20 0d 04 e2 1f 20 20 20 20 20 20 20 20 42 | .... B| 00000cc0 4c 20 20 20 20 20 20 63 6c 6f 73 65 5f 66 69 6c |L close_fil| 00000cd0 65 73 0d 04 ec 0c 20 20 20 20 20 20 20 20 0d 04 |es.... ..| 00000ce0 f6 19 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |.. MOV | 00000cf0 20 20 72 30 2c 72 37 0d 05 00 22 20 20 20 20 20 | r0,r7..." | 00000d00 20 20 20 41 44 52 20 20 20 20 20 72 31 2c 64 69 | ADR r1,di| 00000d10 66 66 65 72 65 6e 63 65 73 0d 05 0a 1a 20 20 20 |fferences.... | 00000d20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 32 2c | MOV r2,| 00000d30 23 31 30 0d 05 14 2a 20 20 20 20 20 20 20 20 53 |#10...* S| 00000d40 57 49 20 20 20 20 20 22 58 4f 53 5f 43 6f 6e 76 |WI "XOS_Conv| 00000d50 65 72 74 43 61 72 64 69 6e 61 6c 34 22 0d 05 1e |ertCardinal4"...| 00000d60 0c 20 20 20 20 20 20 20 20 0d 05 28 19 20 20 20 |. ..(. | 00000d70 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 37 2c | CMP r7,| 00000d80 23 30 0d 05 32 21 20 20 20 20 20 20 20 20 41 44 |#0..2! AD| 00000d90 52 45 51 20 20 20 72 30 2c 66 69 6c 65 73 5f 73 |REQ r0,files_s| 00000da0 61 6d 65 0d 05 3c 26 20 20 20 20 20 20 20 20 41 |ame..<& A| 00000db0 44 52 4e 45 20 20 20 72 30 2c 66 69 6c 65 73 5f |DRNE r0,files_| 00000dc0 64 69 66 66 65 72 65 6e 74 0d 05 46 0c 20 20 20 |different..F. | 00000dd0 20 20 20 20 20 0d 05 50 20 20 20 20 20 20 20 20 | ..P | 00000de0 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f 57 72 | SWI "XOS_Wr| 00000df0 69 74 65 30 22 0d 05 5a 21 20 20 20 20 20 20 20 |ite0"..Z! | 00000e00 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f 4e 65 | SWI "XOS_Ne| 00000e10 77 4c 69 6e 65 22 0d 05 64 04 0d 05 6e 24 2e 45 |wLine"..d...n$.E| 00000e20 78 69 74 20 20 20 4c 44 4d 46 44 20 20 20 73 70 |xit LDMFD sp| 00000e30 20 21 2c 7b 72 30 2d 72 31 31 2c 70 63 7d 0d 05 | !,{r0-r11,pc}..| 00000e40 78 04 0d 05 82 13 2e 68 61 6e 64 6c 65 31 20 45 |x......handle1 E| 00000e50 51 55 44 20 30 0d 05 8c 13 2e 68 61 6e 64 6c 65 |QUD 0.....handle| 00000e60 32 20 45 51 55 44 20 30 0d 05 96 04 0d 05 a0 0f |2 EQUD 0........| 00000e70 2e 66 69 6c 65 73 5f 73 61 6d 65 0d 05 aa 2c 20 |.files_same..., | 00000e80 20 20 20 20 20 20 20 45 51 55 53 20 20 20 20 22 | EQUS "| 00000e90 46 69 6c 65 73 20 69 64 65 6e 74 69 63 61 6c 22 |Files identical"| 00000ea0 3a 45 51 55 42 20 30 0d 05 b4 11 20 20 20 20 20 |:EQUB 0.... | 00000eb0 20 20 20 41 4c 49 47 4e 0d 05 be 0c 20 20 20 20 | ALIGN.... | 00000ec0 20 20 20 20 0d 05 c8 14 2e 66 69 6c 65 73 5f 64 | .....files_d| 00000ed0 69 66 66 65 72 65 6e 74 0d 05 d2 23 20 20 20 20 |ifferent...# | 00000ee0 20 20 20 20 45 51 55 53 20 20 20 20 22 44 69 66 | EQUS "Dif| 00000ef0 66 65 72 65 6e 63 65 73 3a 20 22 0d 05 dc 10 2e |ferences: ".....| 00000f00 64 69 66 66 65 72 65 6e 63 65 73 0d 05 e6 20 20 |differences... | 00000f10 20 20 20 20 20 20 20 45 51 55 53 20 20 20 20 22 | EQUS "| 00000f20 31 32 33 34 35 36 37 38 39 30 22 0d 05 f0 11 20 |1234567890".... | 00000f30 20 20 20 20 20 20 20 41 4c 49 47 4e 0d 05 fa 04 | ALIGN....| 00000f40 0d 06 04 0c 2e 6e 6f 5f 66 69 6c 65 0d 06 0e 19 |.....no_file....| 00000f50 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00000f60 72 32 2c 72 30 0d 06 18 1a 20 20 20 20 20 20 20 |r2,r0.... | 00000f70 20 4d 4f 56 20 20 20 20 20 72 30 2c 23 31 39 0d | MOV r0,#19.| 00000f80 06 22 1e 20 20 20 20 20 20 20 20 53 57 49 20 20 |.". SWI | 00000f90 20 20 20 22 58 4f 53 5f 46 69 6c 65 22 0d 06 2c | "XOS_File"..,| 00000fa0 19 20 20 20 20 20 20 20 20 42 20 20 20 20 20 20 |. B | 00000fb0 20 45 72 72 6f 72 0d 06 36 0c 20 20 20 20 20 20 | Error..6. | 00000fc0 20 20 0d 06 40 10 2e 63 6c 6f 73 65 5f 66 69 6c | ..@..close_fil| 00000fd0 65 73 0d 06 4a 23 20 20 20 20 20 20 20 20 53 54 |es..J# ST| 00000fe0 4d 46 44 20 20 20 73 70 20 21 2c 7b 72 30 2d 72 |MFD sp !,{r0-r| 00000ff0 31 2c 6c 72 7d 0d 06 54 1e 20 20 20 20 20 20 20 |1,lr}..T. | 00001000 20 4c 44 52 20 20 20 20 20 72 31 2c 68 61 6e 64 | LDR r1,hand| 00001010 6c 65 31 0d 06 5e 19 20 20 20 20 20 20 20 20 43 |le1..^. C| 00001020 4d 50 20 20 20 20 20 72 31 2c 23 30 0d 06 68 19 |MP r1,#0..h.| 00001030 20 20 20 20 20 20 20 20 4d 4f 56 4e 45 20 20 20 | MOVNE | 00001040 72 30 2c 23 30 0d 06 72 1e 20 20 20 20 20 20 20 |r0,#0..r. | 00001050 20 53 57 49 4e 45 20 20 20 22 58 4f 53 5f 46 69 | SWINE "XOS_Fi| 00001060 6e 64 22 0d 06 7c 0c 20 20 20 20 20 20 20 20 0d |nd"..|. .| 00001070 06 86 1e 20 20 20 20 20 20 20 20 4c 44 52 20 20 |... LDR | 00001080 20 20 20 72 31 2c 68 61 6e 64 6c 65 32 0d 06 90 | r1,handle2...| 00001090 19 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 000010a0 20 72 31 2c 23 30 0d 06 9a 19 20 20 20 20 20 20 | r1,#0.... | 000010b0 20 20 4d 4f 56 4e 45 20 20 20 72 30 2c 23 30 0d | MOVNE r0,#0.| 000010c0 06 a4 1e 20 20 20 20 20 20 20 20 53 57 49 4e 45 |... SWINE| 000010d0 20 20 20 22 58 4f 53 5f 46 69 6e 64 22 0d 06 ae | "XOS_Find"...| 000010e0 24 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 |$ LDMFD | 000010f0 20 73 70 20 21 2c 7b 72 30 2d 72 31 2c 70 63 7d | sp !,{r0-r1,pc}| 00001100 5e 0d 06 b8 04 0d 06 c2 10 2e 63 6c 6f 73 65 5f |^.........close_| 00001110 45 72 72 6f 72 0d 06 cc 1f 20 20 20 20 20 20 20 |Error.... | 00001120 20 42 4c 20 20 20 20 20 20 63 6c 6f 73 65 5f 66 | BL close_f| 00001130 69 6c 65 73 0d 06 d6 0d 20 20 20 20 20 20 20 20 |iles.... | 00001140 3b 0d 06 e0 1c 2e 45 72 72 6f 72 20 20 41 44 44 |;.....Error ADD| 00001150 20 20 20 20 20 73 70 2c 73 70 2c 23 34 0d 06 ea | sp,sp,#4...| 00001160 24 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 |$ LDMFD | 00001170 20 73 70 20 21 2c 7b 72 31 2d 72 31 31 2c 6c 72 | sp !,{r1-r11,lr| 00001180 7d 0d 06 f4 1f 20 20 20 20 20 20 20 20 84 52 53 |}.... .RS| 00001190 20 20 20 20 70 63 2c 6c 72 2c 23 31 3c 3c 32 38 | pc,lr,#1<<28| 000011a0 0d 06 fe 04 0d 07 08 0b 2e 73 79 6e 74 61 78 0d |.........syntax.| 000011b0 07 12 17 20 20 20 20 20 20 20 20 45 51 55 44 20 |... EQUD | 000011c0 20 20 20 32 32 30 0d 07 1c 36 20 20 20 20 20 20 | 220...6 | 000011d0 20 20 45 51 55 53 20 20 20 20 22 53 79 6e 74 61 | EQUS "Synta| 000011e0 78 3a 20 2a 43 6f 6d 70 61 72 65 20 3c 66 69 6c |x: *Compare <fil| 000011f0 65 31 3e 20 3c 66 69 6c 65 32 3e 22 0d 07 26 15 |e1> <file2>"..&.| 00001200 20 20 20 20 20 20 20 20 45 51 55 42 20 20 20 20 | EQUB | 00001210 30 0d 07 30 11 20 20 20 20 20 20 20 20 41 4c 49 |0..0. ALI| 00001220 47 4e 0d 07 3a 16 2e 64 69 66 66 65 72 65 6e 74 |GN..:..different| 00001230 5f 6c 65 6e 67 74 68 73 0d 07 44 16 20 20 20 20 |_lengths..D. | 00001240 20 20 20 20 45 51 55 44 20 20 20 20 31 37 0d 07 | EQUD 17..| 00001250 4e 31 20 20 20 20 20 20 20 20 45 51 55 53 20 20 |N1 EQUS | 00001260 20 20 22 46 69 6c 65 73 20 61 72 65 20 64 69 66 | "Files are dif| 00001270 66 65 72 65 6e 74 20 6c 65 6e 67 74 68 73 22 0d |ferent lengths".| 00001280 07 58 15 20 20 20 20 20 20 20 20 45 51 55 42 20 |.X. EQUB | 00001290 20 20 20 30 0d 07 62 11 20 20 20 20 20 20 20 20 | 0..b. | 000012a0 41 4c 49 47 4e 0d 07 6c 09 2e 61 72 67 73 0d 07 |ALIGN..l..args..| 000012b0 76 21 20 20 20 20 20 20 20 20 45 51 55 53 20 20 |v! EQUS | 000012c0 20 20 22 2c 2c 76 65 72 62 6f 73 65 2f 73 22 0d | ",,verbose/s".| 000012d0 07 80 15 20 20 20 20 20 20 20 20 45 51 55 42 20 |... EQUB | 000012e0 20 20 20 30 0d 07 8a 11 20 20 20 20 20 20 20 20 | 0.... | 000012f0 41 4c 49 47 4e 0d 07 94 06 5d ed 0d 07 9e 2d c8 |ALIGN....]....-.| 00001300 99 20 22 4f 53 5f 46 69 6c 65 22 2c 31 30 2c 22 |. "OS_File",10,"| 00001310 25 2e 43 6f 6d 70 61 72 65 22 2c 26 46 46 43 2c |%.Compare",&FFC,| 00001320 2c 63 6f 64 65 2c 50 25 0d 07 a8 05 e0 0d ff |,code,P%.......| 0000132f