Define the concept of assembler | cross-assembler | compiler interpreter | linker | loader

ASSEMBLER:-

 

program that translates an assembly language program into a machine language program is called an assembler.

The assembler uses mnemonic symbols that can be easily translated into machine code.

Cross Assembler:-

A cross assembler is an assembler that runs on a computer other than that for which it produces machine codes.

In such a situation, a faster and powerful computer can be used for program development. The programs so developed are to be run on smaller computers. For such program development, a cross-assembler is required.
 
These are further divided as follows :
 

a. One-pass assembler:-

These are equipped to assign the memory addresses to the variables and translate the instruction simultaneously in the first pass itself.
 

b.Two-pass assembler:-

These read the program statement twice. In the first pass, it read all the variables and assign the memory addresses. In the second pass, it reads the instructions manipulating the variable and translates them to manipulate the memory addresses.
 

COMPILER:-

A program which translate a high-level language into a machine language is called a compiler .

A compiler checks all kinds of limits , ranges, errors etc. But its program execution time is more , and occupies a larger part of memory.

It has slow speed  and low efficiency in memory utilization.

A compiler goes through the entire high-level language program once or twice  and then the entire program into machine codes.
 

Interpreter:-

An interpreter is a program that translates statements of a high-level language program into machine codes.
 
It translates one statement of the program at a time.
 
It reads one statement of a high-level language program translate it into machine code and execute it. Then it reads the next statement of the program again translates and executes it.
In this way, it proceeds further till all the statements of the program are translated and executed.
 

LINKER:-

linker is a program that links smaller programs to form a single program.
 
Linking is a process of gathering or accumulating all the other program files and functions together, that are necessary for the program execution.
 
For example, if the programmer uses the sqrt or pow function in the program, then the programmer has to link the object code of this function, which is included in the math.h library files.
 
While developing a program, subroutines are frequently used. The subroutines are stored in the library file.
 
The linker also links subroutines with the main program. The linker links the machine codes of the program.
 
Therefore, it accepts the user’s program after an editor has edited the program and the compiler has produced machine codes of the program.
 

LOADER:-

The loader is a program that loads machine codes of a program into the system memory.
 
An executable file with extension exe is created, after linking the executable object code.
 
 

Leave a Comment

error: Content is protected !!