Path: utzoo!attcan!uunet!mcrware!jejones From: jejones@mcrware.UUCP (James Jones) Newsgroups: comp.os.os9 Subject: Re: Environment Variables Message-ID: <1568@mcrware.UUCP> Date: 9 Mar 90 15:10:02 GMT References: Reply-To: jejones@mcrware.UUCP (James Jones) Organization: Microware Systems Corp., Des Moines, Iowa Lines: 17 In article rh2y+@andrew.cmu.edu (Russell E. Hoffman, II) writes: >What is the appropriate method for reading shell environment variables >from within C programs in os9/68000 V2.1? For that matter, how do you >do it in RMA, as well? From within C programs, I'd use getenv(). From assembly language, life may be a little tougher. Unlike Unix, OS-9 doesn't have a separate environment, so conventions were established for the parameter string to be used to pass the environment. The parsing of that stuff is handled by the code in cstart.r, which is linked in with every C program (unless you roll your own cstart). If you have a program written entirely in assembly language, you'll have to do parsing equivalent to that which cstart.r does, and that of course will require that you know how that parameter string is built up. I believe that an issue of *Pipelines* a while back covered that; Microware may have some back issues still available. James Jones