Actually, Assemblers are software, or in other words, a set of instructions that a computer uses to assemble code modules. These modules are said to run on "bare metal", meaning they are "assembled" literally into machine instructions, instead of being "compiled" or "interpreted" into machine instructions. A program that translates programs from assembly language to machine language is assembler.
Any program that is not written in machine language has to be translated in machine language before it is executed by the computer. The means used for translation are themselves computer programs. There are three types of translator programs i.e. Assembler, Compilers and Interpreters.
At this point, I'd like to talk about Assembler, Compiler, Interpreter and Linker.
Assembler:Assembler is a computer program which is used to translate program written in Assembly Language in to machine language. The translated program is called as object program. Assembler checks each instruction for its correctness and generates diagnostic messages, if there are mistakes in the program. Various steps of assembling are:
- 1. Input source program in Assembly Language through an input device.
2. Use Assembler to produce object program in machine language.
3. Execute the program.
- 1. To translate HLL source program to machine codes.
2. To trace variables in the program
3. To include linkage for subroutines.
4. To allocate memory for storage of program and variables.
5. To generate error messages, if there are errors in the program.
- 1. Instructions repeated in program must be translated each time they are executed.
2. Because the source program is translated fresh every time it is used, it is slow process or execution takes more time. Approx. 20 times slower than complier.