Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!netnews.upenn.edu!rutgers!bellcore!faline!thumper!ulysses!mhuxo!mhuxu!att!cbnews!shurr From: shurr@cbnews.ATT.COM (Larry A. Shurr) Newsgroups: comp.sys.ibm.pc Subject: Re: DOS 2.11 environment space Message-ID: <4286@cbnews.ATT.COM> Date: 23 Feb 89 20:07:01 GMT References: <0Y0dvGy00WB7M14foD@andrew.cmu.edu> Reply-To: cbema!las@cbnews.ATT.COM (Larry A. Shurr) Organization: AT&T Bell Laboratories (actually an AGS consultant) Lines: 78 In article <0Y0dvGy00WB7M14foD@andrew.cmu.edu> dd26+@andrew.cmu.edu (Douglas F. DeJulio) writes: >I need to be able to enlarge the environment space under DOS 2.11 O.K. here it is: (Enter the following:) A>DEBUG command.com <- load command.com -r <- show registers (debug replies with:) AX=aaaa BX=bbbb CX=cccc DX=dddd etc... <- debug replies DS=dddd ES=eeee etc... <- with register etc... <- & next instr info (You are interest in cccc which is the file length. Now enter:) -s100l BB 0A 00 B4 48 CD 21 <- search for data (where is the value in the CX register. Debug replies:) ssss:oooo <- segment:offset (this is the hex address where the specified sequence of bytes was found. Now enter:) -u: <- unassemble (where is the segment and the offset from the above. You are now looking at the code which allocates the memory for the environment:) ssss:oooo BB0A00 MOV BX,000A etc B448 MOV AH,48 etc CD21 INT 21 etc etc etc etc . . . . . . . . . . . . (This allocates 10 paragraphs (160 bytes) for the initial environment. By changing the value loaded into BX, you change the environment size. For instance to change the environment to 256 paragraphs (hex 0100) enter:) e: BB 00 01 <- enter new data (where and are as before. To make that permanent, enter:) -w <- write file (you're finished now, so quit:) -q <- quit command Needless to say do this using a copy of COMMAND.COM. Keep your original safe. Some versions of DOS apparently checksum COMMAND.COM to verify that it is "valid" so you may not be able to put just any old value you want. If your DOS has this "feature" and you use a value which alters the check- sum, you get a message complaining about COMMAND.COM being invalid during boot. You will have to reboot using a disk with a "good" (unmodified) COMMAND.COM and try again. In my case, the 0100h value worked so even though this value may seem excessive, I was satisfied to find a usable value. Good luck. regards, Larry Disclaimer: You perform this modification at your own risk. Be careful. -- Signed: Larry A. Shurr (att!cbnews!cbema!las or osu-cis!apr!las) Clever signature, Wonderful wit, Outdo the others, Be a big hit! - Burma Shave (With apologies to the real thing. The above represents my views only.)