What do you understand by Language Translator programs?

Language translators (or language processors) are programs that translate other programs into machine language instruction codes the computer can execute. They also allow you to write your own programs by providing program creation and editing facilities. Computer programs consist of sets of instructions written in programming languages, such as BASIC, COBOL, or PASCAL which must be translated into he computer’s own machine language before they can be processed by the CPU.

Programming language translator programs are known by a variety of names:

An assembler translates the symbolic instruction codes of programs written in an assembly language into machine language instructions. Assemblers are used to translate assembly language (mnemonics) into machine code. An assembler which runs on a computer for which it produces object codes is called a self assembler. An assembler that runs on a computer other than that for which it produces machine code is known as a cross assembler. Assemblers are of two types:

  • One-Pass Assembler is an assembler which reads the assembly language programs only once.
  • Two-Pass Assembler is an assembler which reads the assembly language programs twice. In the first pass, the assembler reads the program and selects all labels. In the second pass, the assembler produces the machine code for each instruction and assigns addresses to each instruction.

A compiler translates a program written in a high-level language into machine code. The program written in the high-level language is referred to as the source code and the compiled machine coded program obtained from it is called the object code.

In case of a large program, we compile the main program and subprograms separately and link them up as necessary for producing the final executable machine program. The linking of these library programs with the main program is done by an operating system program called the linker.

An interpreter is a special type of compiler that translates and executes each program statement one at a time, instead of first producing a complete machine language program, like compilers and assemblers do. The program that is being interpreted is still in its original source language, the way the programmer wrote it. The interpreter translates one program statement into machine language and then causes the machine language to be executed.

It then translates the next statement and so on, until the program is finished. These are however, slower than their compiled counterparts, because the compiler translates the entire programming all at once before the program is run.

However, while using an interpreter each single line of code can be tested interactively, hence the programmer can directly test the results of a programming statement.

Compare items
  • Total (0)