LOADEXEC STRUC
leEnvironment dw ? ;environment-block segment
leCommandTail dd ? ;address of command tail
leFCB_1 dd ? ;address of default FCB #1
leFCB_2 dd ? ;address of default FCB #2
LOADEXEC ENDS
The LOADEXEC structure contains addresses of the environment block, command tail, and default file control blocks (FCBs) to be used by the child program.
leEnvironment
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.
leCommandTail
Specifies a 32-bit address (segment:offset) of the command tail. The system copies the command tail to the pspCommandTail value (at offset 80h) in the 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.
leFCB_1
Specifies a 32-bit address (segment:offset) of the first default FCB. The system copies the FCB to the pspFCB_1 value (at offset 5Ch) in the PSP of the child program.
leFCB_2
Specifies a 32-bit address (segment:offset) of the second default FCB. The system copies the FCB to the pspFCB_2 value (at offset 6Ch) in the PSP of the child program.
If the leEnvironment 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 4B00h Load and Execute Program