home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8640 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  1.7 KB

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