INF: MPC Must Be Used Before P-Code .EXEs May Run

ID Number: Q82286

7.00 | 7.00

MS-DOS | WINDOWS

Summary:

Microsoft C version 7.0 requires two steps to build a program that

uses packed code (p-code): the source must be compiled with /Oq and

the resulting .EXE must be run through the Make P-Code utility (MPC).

Under MS-DOS, the following message is produced when attempting to run

a p-code executable that has not been run through MPC:

This program cannot be run in DOS mode.

Under Microsoft Windows, the program may generate an unrecoverable

application error (UAE) or display the following message:

ABNORMAL PROGRAM TERMINATION

More Information:

MPC reads the executable (.EXE) file produced by LINK and generates

several internal tables needed by the run-time interpreter. Without

these tables, the program is not a valid executable file. Once MPC has

added these tables, the executable file can be run.

MPC may be invoked in several different ways. The CL driver calls the

MPC utility after calling LINK if the enable p-code optimization (/Oq)

was used. If you are compiling and linking in separate steps, MPC will

be invoked by the linker if the /PCODE link option is used. It is also

possible to invoke MPC from the command line, passing it the name of

the executable file. If you are building your application inside the

Programmer's WorkBench (PWB), choose one of the following project

templates: DOS P-CODE EXE or Windows P-CODE EXE.

Additional reference words: pcode 7.00