P-Code Instructions (pcode.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
MPC
◄Up► ◄Contents► ◄Index► ◄Back►
──P-Code Instructions───────────────────────────────────────────────────────
Syntax
MPC [/Fe outputfile] [inputfile]
Controlling the P-Code Build Process
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.
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.
-♦-