Exec Parameter Block (ExecParamRec)
This structure is used in fn 4b00H (load and execute program).
Offset Size Contents
▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
+0 2 wEnvSeg segment of environment for child (0000=current)
+2 4 pfCmdTail address of command line text to place at PSP:0080
+6 4 pfrFCB_1 address of an FCB to be placed at PSP:005c
+0ah 4 pfrFCB_2 address of an FCB to be placed at PSP:006c
14 length of an ExecParamRec
wEnvSeg Segment address of the environment to be provided for the
child process OR 0000H to have DOS create and allocate a
duplicate of the current environment for the child.
If this is non-zero, you must prepare the required series of
ASCIIZ strings. DOS will allocate memory and copy the data,
appending the child program's filename (see DOS Environment).
DOS will free the memory upon termination of the child.
pfCmdTail Text to be passed to the child as it command-line arguments.
It must be in the same format as described in the PSP (126-
character maximum Lstring▲); it will be copied to the child's
PSP at offset 80H.
pfrFCB_2 are unopened FCBs to be copied to the child's PSP.
Notes: ■ Prepare an environment and set wEnvSeg to its paragraph (or set
wEnvSeg to 0000 to have the child inherit a copy of the current
Some programs put their own PROMPT= string into the child's
environment, e.g., PROMPT=Type EXIT to return to MyProg$G
■ Prepare an Lstring command line to pass to the child. If no
command line is needed, it should contain: 00H 0dH. See PSP
offset 80H for the format.
Note that fn 4b00H does NOT process redirection symbols.
■ Set pfCmdTail to the offset and segment of this command line.
If no FCBs are needed (as when EXECing Command.Com) you can
ignore the following steps. If EXECing a program that expects
FCBs (as with FORMAT.COM):
■ prepare two unopened FCBs to pass to the child
■ set pfrFCB_1 to the offset and segment of the first FCB
■ set pfrFCB_2 to the offset and segment of the second FCB
See Also: Process Control Functions
PSP: Program Segment Prefix