LOAD STRUC
ldEnvironment dw ? ;environment-block segment
ldCommandTail dd ? ;address of command tail
ldFCB_1 dd ? ;address of default FCB #1
ldFCB_2 dd ? ;address of default FCB #2
ldSSSP dd ? ;starting stack address
ldCSIP dd ? ;starting code address
LOAD ENDS
The LOAD structure contains addresses of the environment block, command tail, and default file control blocks (FCBs) to be used by the child program.
ldEnvironment
Specifies whether the child program receives a copy of the parent program's environment or a new environment created by the parent program. If this field is zero, the child program receives an exact duplicate of the parent program's environment block. If the field is nonzero, the value entered must be the segment address of a block of memory containing a copy of the new environment for the child program.
ldCommandTail
Specifies a 32-bit address (segment:offset) of the command tail. The system copies the command tail to offset 80h (pspCommandTail field) in the program segment prefix (PSP). The command tail must not exceed 128 bytes and should have the format described in Section 5.2.4, “Command Tail.”
Any redirection of standard files must be accomplished by the parent program. Including redirection characters (<, >, and |) in a command tail does not redirect files.
ldFCB_1
Specifies a 32-bit address (segment:offset) of the first default FCB. The system copies the FCB to offset 5Ch in the child program's PSP (pspFCB_1 field).
ldFCB_2
Specifies a 32-bit address (segment:offset) of the second default FCB. The system copies the FCB to offset 6Ch in the child program's PSP (pspFCB_2 field).
ldSSSP
Receives a 32-bit address (segment:offset) of the start of the stack for the loaded program. This field is filled on return by Load Program (Interrupt 21h Function 4B01h).
ldCSIP
Receives a 32-bit address (segment:offset) of the entry point of the loaded program. This field is filled on return by Load Program (Interrupt 21h Function 4B01h).
If the ldEnvironment field contains a segment address, the parent program must fill the corresponding memory with zero-terminated ASCII strings, each having the form described in Section 5.2.3, “Environment Block.” The new environment must itself be zero-terminated and must not exceed 32K. Whether the child program receives a duplicate environment or a new environment, the system allocates unique memory for the child program and copies the environment specified by the parent program to that memory. The system places the segment address of this unique memory at offset 2Ch in the child program's PSP (pspEnvironment field). The system automatically frees the memory when the child program terminates.
Interrupt 21h Function 4B01h Load Program