Article View: net.micro.pc
Article #6244Re: Current DOS environment
From: Joe Maybee
Date: Thu, 17 Apr 1986 18:37
Date: Thu, 17 Apr 1986 18:37
35 lines
1856 bytes
1856 bytes
In article <322@bnrmtv.UUCP> connery@bnrmtv.UUCP (Glenn Connery) writes:
>>
>>
>> Does anyone out there know how to get a pointer to the
>> CURRENT environment in DOS? What about version dependencies?
>>
>
>The program segment prefix has the segment address of the environment
>at offset 2C. If you take this and add offset zero you will be able
>to locate the current environment for THIS program, which is a COPY
>of that for its parent, usually DOS. It contains a series of strings,
>as displayed by typing SET with no parms, each terminated by a null byte.
>The end of the table is indicated by a trailing NULL (ie. two null bytes
>in a row).
>
>This should be valid for all DOS versions that support the environment.
>--
>
>Glenn Connery, Bell Northern Research, Mountain View, CA
>{hplabs,amdahl,3comvax}!bnrmtv!connery
Yes, but for "exit and stay resident" routines, can't that be
an "old" environment? I need a pointer to the "latest and greatest"
environment. That is to say the "real" DOS environment. Can
anyone help?
--
----maybee@pogo
"We have met the enemy and he is US!"
----Pogo
Technical Details
Message-ID:
<2470@pogo.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!tektronix!orca!pogo!maybeeReferences:
<2454@pogo.UUCP> <322@bnrmtv.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 (USS@Tek, v1.1) based on 4.3bsd-beta 6/6/85; site pogo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!tektronix!orca!pogo!maybee From: maybee@pogo.UUCP (Joe Maybee) Newsgroups: net.micro.pc Subject: Re: Current DOS environment Message-ID: <2470@pogo.UUCP> Date: Thu, 17-Apr-86 13:37:30 EST Article-I.D.: pogo.2470 Posted: Thu Apr 17 13:37:30 1986 Date-Received: Sat, 19-Apr-86 13:15:28 EST References: <2454@pogo.UUCP> <322@bnrmtv.UUCP> Reply-To: maybee@pogo.UUCP (Joe Maybee) Organization: Tektronix, Inc., Beaverton, OR. Lines: 35