home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / info / dos5pats.doc < prev    next >
Internet Message Format  |  1994-03-07  |  4KB

  1. From: NETOPRWA@ncsuvm.ncsu.edu (Wayne Aiken)
  2. Newsgroups: comp.sys.ibm.pc.misc
  3. Subject: Larry Rainey's DOS 5.0 patches
  4. Date: 1 Jul 91 04:17:44 GMT
  5.  
  6. This is from StarFleet BBS  (919) 782-3095  24 hrs  14.4HST/DS
  7.  
  8. ------------------------------cut here----------------------------------
  9.  
  10.  
  11. Below, I present sections of code from MicroSoft MSDOS 5.00,
  12. dis-assembled with DEBUG so that those with versions of DOS other than
  13. the ones listed above can find the offsets for their COMMAND.COM.
  14.  
  15. In every most DOS versions, most of the sections of code to be patched
  16. are unchanged, they are simply shifted in position so it's just a
  17. question of locating the correct offsets by searching for strings of
  18. bytes from the sections of code listed below.  The main trick here is
  19. to avoid addresses in the code which are likely to be different (most
  20. absolute addresses will be different while relative addresses may or
  21. may not be different).  Assuming you're handy with DEBUG or a similar
  22. debugger and know some 8088 assembly, you should be able to pull it
  23. off.  If DEBUG's search command is too limited, you might try
  24. Unassembling the whole COMMAND.COM to a text file and using an editor
  25. or lister utility to search.
  26.  
  27.  
  28. Here are the sections of code from MicroSoft MSDOS 5.00:
  29.  
  30.  
  31. The environment size
  32.  
  33. -u 165b
  34.  
  35. 1111:165B 58            POP   AX
  36. 1111:165C C706C01E5100  MOV   WORD PTR [1EC0],0051
  37. 1111:1662 C706BE1E1000  MOV   WORD PTR [1EBE],0010  <<default envir. size>>
  38. 1111:1668 BAD498        MOV   DX,98D4
  39. 1111:166B B104          MOV   CL,04
  40. 1111:166D D3EA          SHR   DX,CL
  41. 1111:166F 8916CE1E      MOV   [1ECE],DX
  42. 1111:1673 2BC2          SUB   AX,DX
  43. 1111:1675 A39802        MOV   [0298],AX
  44. 1111:1678 A12C00        MOV   AX,[002C]
  45.  
  46. Just searching for '10 00' should find this one.
  47.  
  48.  
  49. Echo off for AUTOEXEC.BAT
  50.  
  51. -u 1a7d
  52.  
  53. 1111:1A7D A15202        MOV   AX,[0252]
  54. 1111:1A80 C606A60203    MOV   BYTE PTR [02A6],03   <<Change 03 to 02 for
  55. 1111:1A85 C706B5020100  MOV   WORD PTR [02B5],0001   ECHO OFF in AUTOEXEC.BAT>>
  56. 1111:1A8B 8EC0          MOV   ES,AX
  57. 1111:1A8D 33FF          XOR   DI,DI
  58. 1111:1A8F B000          MOV   AL,00
  59. 1111:1A91 AA            STOSB
  60. 1111:1A92 B001          MOV   AL,01
  61. 1111:1A94 AA            STOSB
  62. 1111:1A95 33C0          XOR   AX,AX
  63. 1111:1A97 AA            STOSB
  64. 1111:1A98 AB            STOSW
  65. 1111:1A99 AB            STOSW
  66. 1111:1A9A AA            STOSB
  67. 1111:1A9B AB            STOSW
  68. 1111:1A9C AB            STOSW
  69.  
  70. Searching for '03 C7 06' works or 'AA AB AB AA' should find this
  71.  
  72.  
  73. Echo off for other batch files
  74.  
  75. -u 2ace
  76.  
  77. 1111:2ACE 26            ES:
  78. 1111:2ACF A0A602        MOV   AL,[02A6]
  79. 1111:2AD2 2401          AND   AL,01         <<change 01 to 00 for ECHO OFF
  80. 1111:2AD4 50            PUSH  AX              in regular bat files>>
  81. 1111:2AD5 33C0          XOR   AX,AX
  82. 1111:2AD7 26            ES:
  83. 1111:2AD8 F7065202FFFF  TEST  WORD PTR [0252],FFFF
  84. 1111:2ADE 7414          JZ    2AF4
  85. 1111:2AE0 26            ES:
  86. 1111:2AE1 A15202        MOV   AX,[0252]
  87. 1111:2AE4 26            ES:
  88. 1111:2AE5 803EB80201    CMP   BYTE PTR [02B8],01
  89. 1111:2AEA 7408          JZ    2AF4
  90. 1111:2AEC 06            PUSH  ES
  91. 1111:2AED 8EC0          MOV   ES,AX
  92.  
  93. Look for '24 01 50 33 C0'.
  94.  
  95. Larry Rainey  6/11/91
  96.  
  97. Recapped in easy keyin format:
  98.  
  99.  
  100. DEBUG COMMAND.COM
  101. -E 1666 10 20
  102. -E 1A84 03 02
  103. -E 2AD3 01 00
  104. -W
  105. -Q
  106.  
  107. will make echo off the default and set you environment to 512 (x'20')
  108.  
  109.  
  110.  
  111. Wayne Aiken             netoprwa@ncsuvm.bitnet         "You can BE what
  112. PO Box 30904            netoprwa@ncsuvm.cc.ncsu.edu     you WON'T!!"
  113. Raleigh, NC  27622      slack@ncsu.edu                   --"Bob"
  114. (919) 782-8171          StarFleet BBS: (919) 782-3095
  115.