Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ prom_getenv(2spp) — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

environ(7)

prom_exec(2spp)



PROMGETENV(2spp)   RISC/os Reference Manual    PROMGETENV(2spp)



NAME
     getenv - get value for prom monitor environment variable

SYNOPSIS
     #include <prom/entrypt.h>
     #define RVEC 0xbfc00000

     char *promgetenv(name)
     char *name;

DESCRIPTION
     Prom_getenv searches the PROM monitor environment list (see
     environ(7)) for a string of the form name=value and returns
     a pointer to the string value if such a string is present,
     otherwise getenv returns the value 0 (NULL).

     Prom_getenv differs from the getenv(3spp) call by reading
     the PROM monitor environment, rather than the current
     environment of the running standalone program.  Since the
     current environment is inherited from the PROM environment,
     they are often identical.

EXAMPLE
     The following example loads the address of name into the a0
     register.  name should contain the variable that you want to
     get from non-volitile RAM.

          getenv: l1     v0, PROM_GETENV
               j    v0
               .
               .
               .
          la   a0, name
          jal  getenv
               .
               .
               .
          name:     asciiz    "bootfile"


SEE ALSO
     environ(7), prom_exec(2spp)













                         Printed 1/6/92                    Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026