home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / misc / 3048 < prev    next >
Encoding:
Text File  |  1992-09-15  |  3.1 KB  |  87 lines

  1. Newsgroups: comp.os.ms-windows.misc
  2. Path: sparky!uunet!think.com!linus!linus.mitre.org!jcmorris
  3. From: jcmorris@mwunix.mitre.org (Joe Morris)
  4. Subject: Re: Environment Size for Non-Windows Applications
  5. Message-ID: <jcmorris.716575774@mwunix>
  6. Sender: news@linus.mitre.org (News Service)
  7. Nntp-Posting-Host: mwunix.mitre.org
  8. Organization: The MITRE Corporation
  9. References: <1686395F1.ELURONA@YaleVM.YCC.Yale.Edu>
  10. Date: Tue, 15 Sep 1992 16:49:34 GMT
  11. Lines: 74
  12.  
  13. ELURONA@YaleVM.YCC.Yale.Edu (R. Elul) writes:
  14.  
  15. >Does anyone know how to increase the environemnt size available to DOS
  16. >applications running under Windows 3.1?
  17.  
  18. Change the Program Properties or .PIF program name to specify COMMAND.COM
  19. (with the desired program name as the command) and include the /E:size
  20. switch to specify additional environment space.
  21.  
  22. An alternative (not a good idea for all users) is to patch COMMAND.COM
  23. to specify a more reasonable default environment space.  A USENET
  24. posting a while back summarized the procedure (other patches are
  25. deleted from this listing):
  26.  
  27. =-=-=-=-=-=-=-=-=-=  begin included text  =-=-=-=-=-=-=-=-=
  28.  
  29. [header lines prefixed to keep mailers happy -- jcm]
  30. ==Subject: Larry Rainey's DOS 5.0 patches
  31. ==Date: 1 Jul 91 04:17:44 GMT
  32. ==Organization: North Carolina State University Computing Center
  33.  
  34. Below, I present sections of code from MicroSoft MSDOS 5.00, dis-assembled with
  35. DEBUG so that those with versions of DOS other than the ones listed above
  36. can find the offsets for their COMMAND.COM.
  37.  
  38. In every most DOS versions, most of the sections of code to be patched
  39. are unchanged, they are simply shifted in position so it's just a question
  40. of locating the correct offsets by searching for strings of bytes from the
  41. sections of code listed below.  The main trick here is to avoid addresses
  42. in the code which are likely to be different (most absolute addresses will
  43. be different while relative addresses may or may not be different).  Assuming
  44. you're handy with DEBUG or a similar debugger and know some 8088 assembly,
  45. you should be able to pull it off.  If DEBUG's search command is too limited,
  46. you might try Unassembling the whole COMMAND.COM to a text file and using
  47. an editor or lister utility to search.
  48.  
  49. Here are the sections of code from MicroSoft MSDOS 5.00:
  50.  
  51. The environment size
  52.  
  53. -u 165b
  54.  
  55. 1111:165B 58            POP   AX
  56. 1111:165C C706C01E5100  MOV   WORD PTR [1EC0],0051
  57. 1111:1662 C706BE1E1000  MOV   WORD PTR [1EBE],0010  <<default envir. size>>
  58. 1111:1668 BAD498        MOV   DX,98D4
  59. 1111:166B B104          MOV   CL,04
  60. 1111:166D D3EA          SHR   DX,CL
  61. 1111:166F 8916CE1E      MOV   [1ECE],DX
  62. 1111:1673 2BC2          SUB   AX,DX
  63. 1111:1675 A39802        MOV   [0298],AX
  64. 1111:1678 A12C00        MOV   AX,[002C]
  65.  
  66. Just searching for '10 00' should find this one.
  67.  
  68. Larry Rainey  6/11/91
  69.  
  70. Recapped in easy keyin format:
  71.  
  72.  
  73. DEBUG COMMAND.COM
  74. -E 1666 10 20
  75. -W
  76. -Q
  77.  
  78. will set your environment to 512 (x'20')
  79.  
  80. =-=-=-=-=-=-=-=-=-=  end included text  =-=-=-=-=-=-=-=-=-=
  81.  
  82. Of course, the best thing would be for Microsoft to fix the code in
  83. COMMAND.COM to propagate the parent's environment space value.  Don't
  84. hold your breath....
  85.  
  86. Joe Morris / MITRE
  87.