P-Code


P-Code is an intermediate code for the Pascal programming language. Early implementations of Pascal translated Pascal code into a machine-independent P-Code representation. This intermediate form was then interpreted by a program that was specific to a computer architecture. As a consequence, only this compact interpreter had to be adapted to the different architectures. The disadvantage was that the programs became much slower, due to the additional interpretation layer. Later Pascal compilers therefore generated direct native code in the machine language of the CPU. These programs could run much faster. Java and .NET

After many years of silence, the idea of ​​a machine-independent intermediate code has been resurrected. The Java Virtual Machine and Microsoft .NET platform are based on the same principle. The old disadvantages of slower processing appear to be eliminated, on the one hand because the processors have become a factor of 4000 faster (in the P-Code time, a 6502 processor was 1 MHz common), on the other hand, because both Java and .Net are the machine-independent do not interpret code but first pre-compile.

wiki