Programming Language Translator Software
The computer understands instructions written in the machine language, i.e. in the form of Os’ and 1s. A program written in a high-level programming language has to be converted into the machines code with the help of special programs. These programs are called translators. Translators are divided into three categories:
The compilers translate the complete source program written in a high level language into the machine language as a whole.
A system software package that converts a high-level language program to machine language is called compiler.
The program written in a high-level programming language is called the source program. The source program is stored on the disk in a file. The compiler translates the source program into machine codes and makes another program file called the object file. The object file contains the translated program. Both the files, source and object, are saved on the disk permanently.
The object program translated by complier can be executed a number of times without translating it again. If there is any source program, the complier specifies the errors at the end of compilation. The errors must be removed before the compilers can successfully complier the source program.
The interpreters translate a source program one instruction at a time and execute each instruction immediately. If there is any error in an instruction, the interpreters specify the nature of the error at the same time and stop the translating process. It makes it easier to correct the mistakes in the source program. The interpreters translate the program instruction one by one and execute immediately and do not create an object program. So to execute a source program, it must be translated every time. To execute a source program with help of an interpreter, both the interpreter and the source program are loaded into the computer memory. This method of translating and executing a program is slow and time consuming.
A program written in an assembly language (a low level language) is translated into the machine codes with the help of translator program called assembler.
A computer program, which translates an assembly language program to its machine language equivalent, is called assembler.
The assembler is like a complier. A compiler and an assembler have the same function but an assembler is the translator program for low level languages and a compiler is the translator program for high level languages. Assembler is specifically developed for Assembly language.