Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!udel!haven!adm!news From: cschmidt@lynx.northeastern.edu Newsgroups: comp.lang.pascal Subject: re: Change ENV. Message-ID: <25885@adm.brl.mil> Date: 8 Feb 91 12:59:55 GMT Sender: news@adm.brl.mil Lines: 23 There was some discussion a while back about writing a program that accesses the DOS environment of the parent or root process. Techniques were presented for tracing back through the chain of PSPs to find the root PSP, then using the value at offset $2C in the root PSP as the segment address of the root copy of the DOS environment. Turns out that in Tandy DOS version 03.10.01 the root PSP contains the value zero at this offset. I have discovered by inspection that the root environment is stored in the DOS memory block directly following the DOS memory block that contains the root PSP. I can use this fact as a workaround in the case when $2C contains zero. (When a secondary copy of COMMAND.COM is loaded, that copy's PSP contains the correct segment address of its copy of the environment.) Are there any other versions of DOS that store zero at offset $2C in the root PSP? Can I be confident that by employing the workaround described above, my programs will work with all versions of DOS? I will summarize to the net replies received by mail. Christopher Schmidt cschmidt@lynx.northeastern.edu