System programming
Every high-level programming language (except strictly interpretive languages) comes with a compiler. A compiler is a program that translates an executable program in one language into an executable program in another language:
Figure 1. Abstract data flow view of compiler layer
In another word, programming language and complier defined a virtual machine that specifies what statements of application program are acceptable.
Figure2. Multistep processing of a user application program
From Figure 7, we can tell for a typical application program to execute on hardware platform will go through three main steps: compile time, load time and runtime. Compile time is the compiler/assembler working time, as mentioned before. To obtain better memory-space utilization, modern operating system use dynamic loading which means main program is loaded into memory and executed, when a routine needs to call another routine, the calling routine first checks to see if the callee routine has been loaded, if not, the loader is called to load desired routine into memory and then control is passed to newly loaded routine. [3]
Take Java for specified example here:
Figure 3. Java Virtual Machine (JVM)
The JVM consists of a class loader and a Java interpreter that executes the architecture-neutral bytecodes. The class loader loads .class files from both the Java program and the Java API for execution by the Java interpreter. The Java interpreter may be a software interpreter that interprets the bytecodes one at a time, or it may be a just-in-time (JIT) compiler that turns the architecture-neutral bytecodes into native machine language for the host computer. In other instances, the interpreter may be implemented in a hardware chip that executes Java bytecodes natively.
1. Open source resources
GCC-a popular C compiler: http://gcc.gnu.org/
2. Web pages
GCC online documents: http://gcc.gnu.org/onlinedocs/
3. Citations
<<The art of assembly language programming>> dedicated to x86 assembly language.