Instruction manual
GETENV
GETENV
Get an environment variable from the name space table.
Format
status = DISPATCH(GETENV,
env_id,
buffer_ptr,
buffer_length);
Arguments
GETENV
GETENV function code (22
16
).
env_id
ID number of the environment variable.
buffer_ptr
Virtual address of the buffer to write the environment value.
buffer_length
Length of the buffer.
Description
This routine reads the environment variable from the name space table and
saves it in the buffer pointed to by buffer_ptr. If the buffer is not large enough to
receive the variable’s value, as much of the variable’s byte-stream as possible is
written to the buffer.
Returns:
R0<63:61> = 000 Success
R0<63:61> = 001 Success, truncated byte stream
R0<63:61> = 110 Failure, absent variable
R0<60:32> Should be zero
R0<31:0> Length of the returned variable
Console 16–59