Define Compiler, Interpreter, Assembler, Linker, Loader, Macro.

 







  1. Compiler
       
    • A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language).
    • Typically, from high level source code to low level machine code or object code.

  2. Interpreter
       
    • An interpreter is a common kind of language processor. Instead of producing target program as a translation, an interpreter appears to directly execute the operations specified in the source program on inputs supplied by the user.
    • In contrast, an interpreter reads a statement from the input, converts it to an intermediate code, execute it, then takes the next statement in sequence.
    • If an error occurs, an interpreter stops execution and reports it.

  3. Assembler
       
    • An assembler translates assembly language programs into machine code. The output of a assembler is called an object file, which contains a combination of machine instruction as well as the data required to place these intstructions in memory.

  4. Linker
       
    • Linker is a computer program that links and merges various object files together in order to make an executable file. All these files might have been compiled by separate assembler.
    • The major task of a linker is to search and locate referenced module/routines in a program and to determine the memory location where these codes will be loaded making the program instruction to have absolute reference.

  5. Loader
       
    • Loader is a part of operating system and is responsible for loading executable files into memory and execute them.
    • It calculates the size of a program (instructions and data) and create memory space for it. It initializes various registers to initiate execution.

  6. Macro
       
    • Macro is a single line abbreviation for group of instructions.
    • With the help of macro, programmer can define a single "instruction" to represent block of code.