home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / xref / xcopy.pat < prev    next >
Text File  |  1987-05-16  |  4KB  |  94 lines

  1.  
  2.              How to make XCOPY work with all versions of DOS
  3.  
  4. *******************************************************************************
  5.  
  6. Notes - My version of XCOPY is dated 30-Dec-85 (12-30-85), 12.00 PM.
  7.         The filesize is 11200 bytes.
  8.         If your copy is identical, the numbers which I give may be used in
  9.         the patch.  If not, follow the entire procedure, in order to find
  10.         the correct locations.
  11.  
  12.         I have been using the patched version with DOS 3.1 for several
  13.         months.  It should also work with 3.0.
  14.  
  15.         I DO NOT recommend using the patched program with any version of DOS
  16.         before 3.0 (ie, 1.0 2.0, 2.1...)  I doubt that the former versions
  17.         have certain necessary functions for XCOPY's use.  Try it on a scratch
  18.         disk - if it works, be happy - if it doesn't, invest in a copy of 3.1.
  19.  
  20. *******************************************************************************
  21.  
  22. Follow the procesure shown below, using SYMDEB (or DEBUG, or your favorite)
  23. to patch the program file.
  24.  
  25. Segment addresses, the first 4 digits before the colons, are shown here as
  26. 'xxxx' as they will vary from machine to machine.  The offsets, i.e. the 4 
  27. digits following the colons, must be as shown.  You type the 4 digit
  28. segment address you see before the indicated offset, when using the
  29. 'u' and 'a' commands.
  30.  
  31.  
  32.  
  33.  C:>ren XCOPY.EXE XCOPY.XXX
  34.  
  35.  C:>symdeb xcopy.xxx
  36.     Microsoft (R) Symbolic Debug Utility  Version 4.00
  37.     Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.
  38.  
  39.     Processor is [80286]
  40.     -s ds:0000 ds:cx B4 30                     ; You type: ds:0000 ds:cx B4 30
  41.     xxxx:292A
  42.     -u xxxx:292A                               ; You type: u xxxx:292A
  43.     xxxx:292A B430           MOV    AH,30
  44.     xxxx:292C CD21           INT    21
  45.     xxxx:292E 86E0           XCHG   AH,AL
  46.     xxxx:2930 3D1403         CMP    AX,0314
  47.     xxxx:2933 7410           JZ     2945
  48.     xxxx:2935 8D16B022       LEA    DX,[22B0]
  49.     xxxx:2939 B409           MOV    AH,09
  50.     xxxx:293B CD21           INT    21
  51.     -a 2933                                    ; You type: a 2933
  52.     xxxx:2933 jmp short 2945                   ; You type: jmp short 2945
  53.     xxxx:2935 <return>                         ; Press Return
  54.     -u xxxx:292A                               ; You type: u xxxx:292A
  55.     xxxx:292A B430           MOV    AH,30
  56.     xxxx:292C CD21           INT    21
  57.     xxxx:292E 86E0           XCHG   AH,AL
  58.     xxxx:2930 3D1403         CMP    AX,0314
  59.     xxxx:2933 EB10           JMP    2945
  60.     xxxx:2935 8D16B022       LEA    DX,[22B0]
  61.     xxxx:2939 B409           MOV    AH,09
  62.     xxxx:293B CD21           INT    21
  63.     -w
  64.     Writing 2CB0 bytes
  65.     -q
  66.  
  67.  C:>ren XCOPY.XXX XCOPY.EXE
  68.  
  69. *************************************************************************
  70.  
  71. What this procedure actually does:
  72.  
  73.     A - REN XCOPY.EXE XCOPY.XXX
  74.         The rename is needed to fool SYMDEB (or DEBUG or whatever) into
  75.         thinking that we are patching a text file.  Without the rename, it
  76.         would think that we are debugging the file, fix all memory references,
  77.         and later use would be impossible.
  78.  
  79.     B - The "s" and "u" commands:
  80.         You are searching for the command MOV AH,30.  This is the call to DOS
  81.         which returns the version number.  After you dissassemble the returned
  82.         location, you can see that this version number is checked against the
  83.         the value 3.20 (high byte is 3, low byte is 20).  If it is correct, a
  84.         jump (JZ, Jump if Zero) skips the code which displays a nasty message
  85.         and exits.
  86.  
  87.     C - The "a" command:
  88.         With this, we replace the conditional jump by an unconditional jump.
  89.         We then do another dissassembly, to confirm that we haven't trashed
  90.         anything important.
  91.  
  92.     D - REN XCOPY.XXX XCOPY.EXE
  93.         Makes it usable.
  94.