home *** CD-ROM | disk | FTP | other *** search
- ;
-
- COMP VERSION 2.8
-
- 1. - An Introduction to COMP
- 2. - Command Line Syntax
- 3. - Options
- 4. - Example Display
- 5. - Example ZEX file using COMP
- :1
- An Introduction to COMP - Compare file to file utility
-
- COM╨á wil∞á comparσ tw∩ file≤ displayinτ byte-for-bytσ matcΦá anΣ ì
- difference« Thσ displa∙ i≤ ß spli⌠ screeε display¼ showinτ match¼ ì
- differences¼á iε botΦ he° anΣ ASCII« Thσ displa∙ caε bσ iε eithe≥ ì
- secto≥ o≥ memor∙ relativσ addressing.
- :2
- Command Line Syntax
-
- Syntax:
-
- COMP du:file1 du:file2 /o
-
- or if file2 name is same as file1 name:
-
- COMP du:file du: /o
- :3
- Command Line Options
-
- Options:
-
- M - Differences are displayed but memory relative
- addresses starting at 100 hex are used.
-
- T - Differences are tested for but not displayed.
- Flow control register 9 is set depending on
- the test results as follows:
- REG 9 = 0 if both files compare.
- REG 9 = 1 if file1 is not found.
- REG 9 = 2 if file2 is not found.
- REG 9 = 3 if files do not compare.
- :4
- Example Display
- Difference found in sector 1
-
- Sector Display for B1:ZRDOS FILE1
- 0000: C3 0B 01 5A 33 45 4E 56 01 00 D0 21 00 00 39 22 |...Z3ENV...!..9"|
- 0010: 56 0A 31 88 0A 2A 09 01 CD E8 0C CD C3 0E 22 EB |V.1..*........".|
- 0020: 07 21 00 00 0E 30 CD 05 00 7D FE 00 20 0B 11 28 |.!...0...}.. ..(|
- 0030: 0A 0E 09 CD 05 00 C3 00 00 CD 07 07 32 33 07 3A |............23.:|
- 0040: 79 00 32 30 07 3A 69 00 32 2F 07 3A 5C 00 B7 20 |y.20.:i.2/.:\.. |
- 0050: 05 CD A4 0E 78 3C 3D 32 31 07 3A 6C 00 B7 20 05 |....x<=21.:l.. .|
- 0060: CD A4 0E 78 3C 3D 32 32 07 21 5D 00 7E FE 2F 20 |...x<=22.!].~./ |
- 0070: 07 23 7E FE 2F CA 40 02 21 82 00 7E 23 FE 00 28 |.#~./.@.!..~#..(|
-
- Sector Display for A15:ROOT FILE2 [ ** means bytes are equal ]
- è0000: ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** |...Z3ENV...!..9"|
- 0010: 18 ** ** 4A ** ** ** ** ** AA ** ** 85 ** ** ** |..1J.*........".|
- 0020: ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** EA |.!...0...}.. ...|
- 0030: 09 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** |............23.:|
- 0040: ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** |y.20.:i.2/.:\.. |
- 0050: ** ** 66 ** ** ** ** ** ** ** ** ** ** ** ** ** |..f.x<=21.:l.. .|
- 0060: ** 66 ** ** ** ** ** ** ** ** ** ** ** ** ** ** |.f.x<=22.!].~./ |
- 0070: ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** |.#~./.@.!..~#..(|
- :5
- Example ZEX file using COMP
-
- ^.
- ^<^|
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;^|
- ; ;^|
- ; ZEX file to copy from source to destination ;^|
- ; if the destination file does not exist or if ;^|
- ; the destination file is different than the ;^|
- ; source file. ;^|
- ; ;^|
- ; Syntax: ;^|
- ; COPIF du:source du:destination ;^|
- ; ;^|
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;^|
- ^>
-
-
-
-
-
-
-
-
- ^#
- ^&
- COMP $1 $2 /T ;note compare file1 to file2 using test only option^|
- if 9 1 ;note if reg 9 = 1 file1 was not found, abort copy^|
- ECHO -- $1 NOT FOUND^|
- else^|
- if 9 2 ;note if reg 9 = 2 file2 was not found, make a new copy^|
- ECHO -- DESTINATION FILE does not exist, copying $1 to DESTINATION^|
- CPY $2=$1^|
- else^|
- if 9 3 ;note if reg 9 = 3 a difference was found, overwrite the old copy^|
- ECHO -- Files are different, updating $2 with $1^|
- CPY $2=$1^|
- else^|
- ECHO -- Files are the same, update not required.^|
- fi ;note if 9 3^|
- fi ;note if 9 2^|
- fi ;note if 9 1^|
- ^#2┴!┘┴!!─!»₧#∙