Understanding Programming Language Translators and Execution
Classified in Computers
Written on in
English with a size of 1.98 KB
Program Sources
Program sources are files containing instructions for a computer. These must be translated into binary code so the CPU can understand them; therefore, source programs are not written in binary. The software responsible for this translation includes assemblers, compilers, or interpreters. Before translation, all errors must be corrected.
Assemblers
Assemblers transform assembly language directly into its equivalent binary code.
Interpreters
An interpreter is responsible for processing, translating, and executing instructions from a high-level language to machine code one by one. Programs with syntax errors will not run. Interpreters typically provide an editor for writing source code, which facilitates easy error correction. A primary drawback is their slowness during successive executions, as each instruction must be translated and executed repeatedly.
Compilers
A compiler translates a source program written in a high-level language into machine code or binary, known as an object program. It does not run the program until all instructions are correctly translated, which makes it faster during subsequent executions.
The Development Process
Edition
Edition involves writing a program in a programming language and recording it on a permanent storage medium, such as a disk. This is done using a text editor, which may or may not be part of the compiler.
Compilation
The program is translated into machine code. If no errors occur, you obtain the object code. If errors are present, the compiler displays messages so they can be corrected before re-compilation.
Linked
Also called assembly, this process joins the object program with internal language routines or other modules. A linker then produces an executable file (e.g., .exe).
Execution
The executable is launched through the operating system after a series of tests have been performed.