Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!nbires!hao!hplabs!hp-pcd!everett From: everett@hp-pcd.UUCP Newsgroups: net.micro.pc Subject: Re: address of environment Message-ID: <13600014@hpcvla.UUCP> Date: Wed, 16-Jul-86 14:33:00 EDT Article-I.D.: hpcvla.13600014 Posted: Wed Jul 16 14:33:00 1986 Date-Received: Fri, 18-Jul-86 05:50:44 EDT References: <107@eurifb.UUCP> Organization: Hewlett-Packard - Corvallis, OR Lines: 15 Nf-ID: #R:eurifb:-10700:hpcvla:13600014:000:634 Nf-From: hpcvla!everett Jul 16 10:33:00 1986 The environment strings are stored in an area which is aligned on a paragraph boundary (a multiple of 16 bytes). The PARAGRAPH address (i.e. the segment) of the current environment can be found by loading the WORD at offset 2c (hex) in your code segment. For example, at the beginning of your program, you could: mov di,2ch ; pointer to envirnment address mov es,cs:[di] ; set extra segment pointing to env xor di,di ; set offset to beginning of env At this point, es:[di] points to the first byte of your environment. Everett Kaser Hewlett-Packard Co. Corvallis, OR