Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ubc-cs.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!alberta!ubc-vision!ubc-cs!manis From: manis@ubc-cs.UUCP (Vince Manis) Newsgroups: net.micro.pc Subject: Re: set environment Message-ID: <984@ubc-cs.UUCP> Date: Mon, 18-Mar-85 15:58:36 EST Article-I.D.: ubc-cs.984 Posted: Mon Mar 18 15:58:36 1985 Date-Received: Wed, 20-Mar-85 03:27:33 EST References: <1200005@ur-univax.UUCP> Reply-To: manis@ubc-cs.UUCP (Vince Manis) Organization: UBC Department of Computer Science Lines: 16 Summary: A pointer to the current environment variables is stored in the segment prefix. I think that the offset is $5c, but I don't have my DOS technical reference in front of me. The environment consists of a sequence of strings, each terminated by a null byte ($00). The last string is followed by a second null. Each string consists of a variable name, an equal sign, and a string. There's no limitation other than a total environment limitation of 32K. Thus to find the value of a given variable, simply search the environment for a string beginning with the variable name followed by an equal sign. A recent issue of PC Tech Journal had a package of Turbo Pascal routines for doing DOS things. I didn't read the article carefully, but I believe there was an example routine there.