O-code

O-code is an intermediate language emitted by the BCPL compiler. It is then compiled into the machine code for the computer which is intended to run the program. This method of compiling allowed the original BCPL compiler to be ported to new machines very easily and as a result it became widespread. The idea has since been used by many more recent compilers. However most of them interpret their equivalent of O-code on a virtual machine rather than compiling it as was originally the case.

O-code machine

The O-code machine is a virtual machine that was developed by Martin Richards in the late 1960s to give machine independence to BCPL, the low-level forerunner to C and C++. The concept behind the O-Code machine was to create O-code output (O stands for Object) through the BCPL compiler. The O-code was then either interpreted or, more normally, compiled to machine specific code. This idea was used in later compilers, such as p-code for some Pascal compilers and bytecode generated for the JVM by Java compilers. O-code allowed Richards to separate general compilation issues from machine specific implementation issues when writing the BCPL compiler. Its use in the BCPL compiler made the compiler easy to port and as a result BCPL quickly became available for many machines.

References

External links

This article is issued from Wikipedia - version of the Saturday, March 05, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.