Article View: comp.os.msdos.programmer
Article #1034Re: Where is the size of the environment block?
From: Arthur Rubin
Date: Wed, 19 Aug 1992 22:09
Date: Wed, 19 Aug 1992 22:09
22 lines
1815 bytes
1815 bytes
In <1992Aug19.135810.156@indyvax.iupui.edu> imhw400@indyvax.iupui.edu writes: >WARNING: newbie-type question follows. I've been writing mainframe assembly >language for years, but this is my very first program for MSDOS or the 80x86. >I'm writing a gadget that needs to create or update an environment variable. >I'm writing in Arrowsoft Assembler (the only real-address-mode translator I've >found for free :-) and have no libraries, so I have to code this myself. I can >find the parent process' environment block with no problem, and (I think) I >understand the format thereof except for one thing: how do I know the size of >the environment block that I've located, so I don't run off the end and damage >other structures? Not bad. From Ralf Brown's interrupt list (under "2152: GET LIST OF LISTS") on memory control blocks, the answer is: the number of paragraphs in the enviroment is the word at (envseg-1):3; the environment is a memory block. (This may not be compatible with some UMB managers.) -- Arthur L. Rubin: a_rubin@dsg4.dse.beckman.com (work) Beckman Instruments/Brea 216-5888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal) My opinions are my own, and do not represent those of my employer. My interaction with our news system is unstable; if you want to be sure I see a post, mail it.
Technical Details
Message-ID:
<a_rubin.714262151@dn66>Path:
arc1-ca.pugleaf.net!sparky!uunet!kithrup!stanford.edu!ames!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!orion.oac.uci.edu!beckman.com!dn66!a_rubinReferences:
<1992Aug19.135810.156@indyvax.iupui.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!stanford.edu!ames!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!orion.oac.uci.edu!beckman.com!dn66!a_rubin Newsgroups: comp.os.msdos.programmer Subject: Re: Where is the size of the environment block? Message-ID: <a_rubin.714262151@dn66> From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin) Date: 19 Aug 92 22:09:11 GMT References: <1992Aug19.135810.156@indyvax.iupui.edu> Nntp-Posting-Host: dn66.dse.beckman.com Lines: 22