h6. [[OS SWI Calls]] h6(. » OS_GetEnv h2. OS_GetEnv h5. (SWI &10) |_<^{width:4em}. Entry | | |<^. - |<^. - | |_<^{width:4em}. Exit | | |<^. R0 |<^. Address of *command (read only) | |<^. R1 |<^. RAM limit | |<^. R2 |<^. Pointer to 5-byte time of program start | h4. Use The purpose of this call is to read environment parameters. h4. Notes The string pointed to by R0 is a copy of the command line used to start the program and can be passed to [[OS_ReadArgs]] to read the parameters. The values in R0-R2 are only guaranteed to persist until the next program is run and so this call should be used at the start of a program and always before the first [[Wimp_Poll]]. The values returned by this SWI in R0 and R2 can be set with [[OS_WriteEnv]], the RAM limit is set with [[OS_ChangeEnvironment]] with a handle number of zero. h4. See also * [[OS_WriteEnv]] * [[OS_ChangeEnvironment]]