When you compile a program into machine code from the command line, CL performs the compilation and then calls LINK to do the linking. When you use the /Oq option to compile a program into p-code, CL calls one other program in addition to LINK: the Make P-Code utility (MPC).
CL calls the MPC utility after calling LINK. MPC reads the executable (.EXE) file produced by LINK and generates several internal tables needed by the run-time interpreter. Once MPC has added these tables, the executable file is ready to run.
MPC requires a segmented executable file as input, even if DOS is the target.
P-code object modules contain special-purpose records that force the generation
of a segmented executable.
If you want to separate the compilation phase from the link and post-link phases, specify the /c option in addition to the /Oq option. This option tells CL to stop after the compilation step. You can run LINK and MPC in one step by specifying the /PCODE option for LINK. For example, the command
LINK /PCODE MYPROG.OBJ
links MYPROG.OBJ and runs MPC on the resulting executable MYPROG.EXE.
Summary: Invoking MPC by itself gives more control over the build process.
You can also invoke invoke MPC individually. If you don't specify the /PCODE option, LINK performs only the standard linking procedure and does not call any additional programs. However, if the .OBJ file contains p-code, LINK cannot produce a file that can be executed. MPC is required to make a p-code program executable.
Use the MPC program to convert the LINK output into an .EXE file that you can run. Specify a name for MPC's output file using the /Fe option. For example:
MPC /Fe MYPROG.EXE MYPROG.PXE
This command reads MYPROG.PXE (linker output) and produces a file named MYPROG.EXE. If you don't specify the /Fe option, MPC uses the name of the input file.