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