delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/2000/11/25/20:09:37

Date: Sat, 25 Nov 2000 16:20:11 +0000
From: Stephen Kitt <steve AT tardis DOT ed DOT ac DOT uk>
To: opendos AT delorie DOT com
Subject: Re: Optimizing CONFIG.SYS...
Message-ID: <20001125162011.B6511@sk2.org>
Mail-Followup-To: Stephen Kitt <steve AT tardis DOT ed DOT ac DOT uk>, opendos AT delorie DOT com
References: <819A5186A6F AT reze-1 DOT rz DOT rwth-aachen DOT de> <001301c05594$ab2df350$a28a1004 AT dbcooper> <2 DOT 07b7 DOT YMVX DOT G4IZ6W AT belous DOT munic DOT msk DOT su> <006101c05614$1f71a4d0$a28a1004 AT dbcooper> <2 DOT 07b7 DOT 3EXL DOT G4K1NY AT belous DOT munic DOT msk DOT su> <001501c056e6$11012b50$ce881004 AT dbcooper>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <001501c056e6$11012b50$ce881004@dbcooper>; from pmoran22@yahoo.com on Sat, Nov 25, 2000 at 06:44:17AM -0700
Reply-To: opendos AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: opendos AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, Nov 25, 2000 at 06:44:17AM -0700, Patrick Moran wrote:
> > >> PM> PROMPT [DRDOS] $P$G
> > >> PM> ^
> > >> PM> These can be loaded anytime. I did not notice any difference if I
> loaded
> > >> PM> them first.
> > >>      PROMPT is not a program, this is substitute for SET PROMPT
> statement,
> > >> also as PATH is a substitute for SET PATH statement.
> > PM> Yes, I know. they do not use any memory, that is why they can be used
> at
> > PM> anytime.
> >
> >      This statement _uses_ memory for consequent environment variable.
> 
> Yes, but that is included in the env size you use in the CONFIG file, it is
> not extra memory that can interfere or fragment loading and memory.

Except that each program you run gets its own copy of the environment,
shrunk to the closest multiple of some value (sixteen bytes would make sense
since that is the size of a paragraph, but thirty-two rings a bell). So
putting stuff in the environment can make a difference when loading TSRs.
That's why the common recommendation is to load all TSRs before setting any
environment variables. If a TSR requires a variable, it should be set just
before that TSR is loaded and unset afterwards... Things vary from TSR to
TSR too since some release their environment while others don't.

(In the example which was being discussed, that wasn't an issue since all
the TSRs were loaded beforehand.)

I'd imagine (but I can't check just now) that the Interrupt List would have
all the gory details, possibly under the DOS EXEC function (interrupt 21h,
function 4Bh if I remember correctly) or the description of the PSP.

Stephen

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019