home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR33 / A-R / COMP28.LBR / COMP.HZP / COMP.HLP
Text File  |  2000-06-30  |  4KB  |  106 lines

  1. ;
  2.  
  3.                         COMP VERSION 2.8
  4.  
  5.                 1. - An Introduction to COMP
  6.                 2. - Command Line Syntax    
  7.                 3. - Options                 
  8.                 4. - Example Display        
  9.                 5. - Example ZEX file using COMP
  10. :1
  11. An Introduction to COMP - Compare file to file utility
  12.  
  13. COM╨á wil∞á comparσ tw∩ file≤ displayinτ byte-for-bytσ matcΦá anΣ ì
  14. difference« Thσ displa∙ i≤ ß spli⌠ screeε display¼ showinτ match¼ ì
  15. differences¼á iε botΦ he° anΣ ASCII« Thσ displa∙ caε bσ iε eithe≥ ì
  16. secto≥ o≥ memor∙ relativσ addressing.
  17. :2
  18. Command Line Syntax
  19.  
  20. Syntax:
  21.  
  22.        COMP du:file1 du:file2 /o
  23.  
  24. or if file2 name is same as file1 name:
  25.  
  26.        COMP du:file  du: /o
  27. :3
  28. Command Line Options
  29.  
  30. Options:
  31.  
  32.        M - Differences are displayed but memory relative
  33.            addresses starting at 100 hex are used.
  34.        T - Differences are tested for but not displayed.
  35.            Flow control register 9 is set depending on
  36.            the test results as follows:
  37.                REG 9 = 0 if both files compare.
  38.                REG 9 = 1 if file1 is not found.
  39.                REG 9 = 2 if file2 is not found.
  40.                REG 9 = 3 if files do not compare.
  41. :4
  42. Example Display
  43. Difference found in sector 1
  44.  
  45. Sector Display for B1:ZRDOS FILE1
  46. 0000:  C3 0B 01 5A  33 45 4E 56  01 00 D0 21  00 00 39 22  |...Z3ENV...!..9"|
  47. 0010:  56 0A 31 88  0A 2A 09 01  CD E8 0C CD  C3 0E 22 EB  |V.1..*........".|
  48. 0020:  07 21 00 00  0E 30 CD 05  00 7D FE 00  20 0B 11 28  |.!...0...}.. ..(|
  49. 0030:  0A 0E 09 CD  05 00 C3 00  00 CD 07 07  32 33 07 3A  |............23.:|
  50. 0040:  79 00 32 30  07 3A 69 00  32 2F 07 3A  5C 00 B7 20  |y.20.:i.2/.:\.. |
  51. 0050:  05 CD A4 0E  78 3C 3D 32  31 07 3A 6C  00 B7 20 05  |....x<=21.:l.. .|
  52. 0060:  CD A4 0E 78  3C 3D 32 32  07 21 5D 00  7E FE 2F 20  |...x<=22.!].~./ |
  53. 0070:  07 23 7E FE  2F CA 40 02  21 82 00 7E  23 FE 00 28  |.#~./.@.!..~#..(|
  54.  
  55. Sector Display for A15:ROOT FILE2  [ ** means bytes are equal ]è0000:  ** ** ** **  ** ** ** **  ** ** ** **  ** ** ** **  |...Z3ENV...!..9"|
  56. 0010:  18 ** ** 4A  ** ** ** **  ** AA ** **  85 ** ** **  |..1J.*........".|
  57. 0020:  ** ** ** **  ** ** ** **  ** ** ** **  ** ** ** EA  |.!...0...}.. ...|
  58. 0030:  09 ** ** **  ** ** ** **  ** ** ** **  ** ** ** **  |............23.:|
  59. 0040:  ** ** ** **  ** ** ** **  ** ** ** **  ** ** ** **  |y.20.:i.2/.:\.. |
  60. 0050:  ** ** 66 **  ** ** ** **  ** ** ** **  ** ** ** **  |..f.x<=21.:l.. .|
  61. 0060:  ** 66 ** **  ** ** ** **  ** ** ** **  ** ** ** **  |.f.x<=22.!].~./ |
  62. 0070:  ** ** ** **  ** ** ** **  ** ** ** **  ** ** ** **  |.#~./.@.!..~#..(|
  63. :5
  64. Example ZEX file using COMP
  65.  
  66. ^.
  67. ^<^|
  68. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;^|
  69. ;                                                         ;^|
  70. ;       ZEX file to copy from source to destination       ;^|
  71. ;       if the destination file does not exist or if      ;^|
  72. ;       the destination file is different than the        ;^|
  73. ;       source file.                                      ;^|
  74. ;                                                         ;^|
  75. ;       Syntax:                                           ;^|
  76. ;         COPIF du:source du:destination                  ;^|
  77. ;                                                         ;^|
  78. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;^|
  79. ^>
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. ^#
  89. ^&
  90. COMP $1 $2 /T ;note compare file1 to file2 using test only option^|
  91. if 9 1 ;note if reg 9 = 1 file1 was not found, abort copy^|
  92.   ECHO --           $1 NOT FOUND^|
  93. else^|
  94.   if 9 2 ;note if reg 9 = 2 file2 was not found, make a new copy^|
  95.     ECHO --       DESTINATION FILE does not exist, copying $1 to DESTINATION^|
  96.     CPY $2=$1^|
  97.   else^|
  98.     if 9 3 ;note if reg 9 = 3 a difference was found, overwrite the old copy^|
  99.       ECHO --           Files are different, updating $2 with $1^|
  100.       CPY $2=$1^|
  101.     else^|
  102.       ECHO --                  Files are the same, update not required.^|
  103.     fi    ;note if 9 3^|
  104.   fi    ;note if 9 2^|
  105. fi    ;note if 9 1^|
  106. ^#