Program Translation | ||
Remember : Computers can only execute binary machine code instructions. Any program written in another language must be converted into machine code before the program can be run. Assembler An assembler is a program which converts a low-level (assembly) language program into executable code. Each mnemonic is replaced by its corresponding binary machine code instruction.
|
||
There are two main types of translator for high level language programs : Compilers and Interpreters. A compiler translates a complete source code program into machine code. An interpreter analyses the source code statement by statement as execution proceeds, interpreting the meaning of each statement and calling routines to carry out each instruction. Advantages of a compiler :
Advantages of an Interpreter :
Cross-Compilers. A cross-compiler enables a program to be compiled on one computer, and executed on a different type of computer. For example, programs may be developed on mainframes which are to be run on microcomputers, or in the development of embedded systems.
|
||