Get_Environment_String

include vmm.inc

mov esi, OFFSET32 Variable ; points to name of environment variable

VMMcall Get_Environment_String

jc not_found ; carry flag set if variable not found

mov [Value], edx ; points to value of environment variable


The Get_Environment_String service returns the value of the specified environment variable.

This service is only available during initialization.

Parameters

Variable

Points to a null-terminated string specifying the name of an MS-DOS environment variable. This service is not sensitive to case, so the name may be given in any combination of uppercase and lowercase letters.

Return Value

The carry flag is clear and the EDX register points to a null-terminated string specifying the value of the environment variable if the service is successful. Otherwise, the carry flag is set to indicate that the environment variable could not be found.

Comments

Environment variables, set using the MS-DOS set command, are a limited resource. Although some virtual devices use environment variables as a way to set operating parameters, this is not recommended unless the variable is used by a set of programs, MS-DOS device drivers, and virtual devices.

Uses

EDX, Flags