Skip to main content

Basic Definitions Of Assembler, Compiler, Interpreter, Linker And Loader

What is Assembler?
  • A computer will not understand any program written in a language, other than its machine language. 
  • The programs written in other languages must be translated into the machine language. 
  • Such translation is performed with the help of software. 
  • "A program which translates an assembly language program into a machine language program is called an assembler." 
  • If an assembler which runs on a computer and produces the machine codes for the same computer then it is called self-assembler or resident assembler.
  • If an assembler that runs on a computer and produces the machine codes for other computer then it is called Cross Assembler
  • Assemblers are further divided into two types: One Pass Assembler and Two Pass Assembler
  • One pass assembler is the assembler which assigns the memory addresses to the variables and translates the source code into machine code in the first pass simultaneously.
  • A Two Pass Assembler is the assembler which reads the source code twice. In the first pass, it reads all the variables and assigns them memory addresses. In the second pass, it reads the source code and translates the code into object code.
What is Compiler?
  • "Compiler is a program which translates a high level language program into a machine language program". 
  • A compiler is more intelligent than an assembler. 
  • It checks all kinds of limits, ranges, errors etc. But its program run time is more and occupies a larger part of the memory. 
  • It has slow speed. Because a compiler goes through the entire program and then translates the entire program into machine codes. 
  • If a compiler runs on a computer and produces the machine codes for the same computer then it is known as a self compiler or resident compiler
  • On the other hand, if a compiler runs on a computer and produces the machine codes for other computer then it is known as a cross compiler.

What is Interpreter?
  • "An interpreter is a program which translates statements of a program into machine code."
  • It translates only one statement of the program at a time. It reads only one statement of program, translates it and executes it. Then it reads the next statement of the program again translates it and executes it. 
  • In this way it proceeds further till all the statements are translated and executed. 
  • On the other hand, a compiler goes through the entire program and then translates the entire program into machine codes. 
  • A compiler is 5 to 25 times faster than an interpreter. 
  • By the compiler, the machine codes are saved permanently for future reference. 
  • On the other hand, the machine codes produced by interpreter are not saved. 
  • An interpreter is a small program as compared to compiler. 
  • It occupies less memory space, so it can be used in a smaller system which has limited memory space.
What is Linker?
  • In high level languages, some built in header files or libraries are stored. 
  • "These libraries are predefined and these contain basic functions which are essential for executing the program. These functions are linked to the libraries by a program called Linker." 
  • If linker does not find a library of a function then it informs to compiler and then compiler generates an error. 
  • The compiler automatically invokes the linker as the last step in compiling a program.
  • Not built in libraries, it also links the user defined functions to the user defined libraries.
  • Usually a longer program is divided into smaller subprograms called modules
  • And these modules must be combined to execute the program. 
  • The process of combining the modules is done by the linker.
What is Loader?
  • "Loader is a program that loads machine codes of a program into the system memory."
  • In Computing, a loader is the part of an Operating System that is responsible for loading programs. 
  • It is one of the essential stages in the process of starting a program. Because it places programs into memory and prepares them for execution. 
  • Loading a program involves reading the contents of executable file into memory. 
  • Once loading is complete, the operating system starts the program by passing control to the loaded program code. 
  • All operating systems that support program loading have loaders. 
  • In many operating systems the loader is permanently resident in memory.

Comments

Popular posts from this blog

8085 Microprocessor: De-multiplexing of AD0-AD7 Address and Data Lines

  De-multiplexing of AD0-AD7 of 8085 Microprocessor THE ADDRESS AND DATA BUSES: • 8085 Microprocessor have total 16 address lines and 8 data lines. • 8 signal lines A8 – A15 which are unidirectional. • The other 8 address bits are multiplexed with the 8 data bits. So, the bits AD0 – AD7 are bi-directional and serve as A0 – A7 (address bus) and D0 – D7 (data bus) at the same time. • During the execution of the instruction, these lines carry the address bits during the early part, then during the late parts of the execution, they carry the 8 data bits. In order to separate the address from the data, we can use a latch to save the value before the function of the bits changes. THE CONTROL AND STATUS SIGNALS: • There are 4 main control and status signals. 1. ALE (Address Latch Enable): This signal is a pulse that become 1 when the AD0 –AD7 lines have an address on them. It becomes 0 after that. This signal can be used to enable a latch to save the address bits from the AD lines. 2. RD (Rea

Interrupts in 8085 Microprocessor: Vectored-Non Vectored Interrupts And Maskable-Non Maskable Interrupts

Vectored Interrupt: In vectored interrupts, the manufacturer fixes the address of the ISR to which the program control is to be transferred. the processor automatically branches to the specific address in response to an interrupt.  • The TRAP, RST 7.5, RST 6.5 and RST 5.5 are vectored interrupts. Non-Vectored Interrupt:   But in non-vectored interrupts the interrupted device should give the address of the interrupt service routine (ISR).    • The INTR is a non-vectored interrupt. Hence when a device interrupts through INTR, it has to supply the address of ISR after receiving interrupt acknowledge signal. Maskable & Non-Maskable Interrupt: The hardware vectored interrupts are classified into maskable and non-maskable interrupts.  • TRAP is non-maskable interrupt.  • RST 7.5, RST 6.5 and RST 5.5 are maskable interrupt. Masking is preventing the interrupt from disturbing the main program. When an interrupt is masked the processor will not accept the interrupt signal. The interrupts ca

Interrupts in 8085 Microprocessor-Hardware Interrupt And Software Interrupt

What is Interrupt and how it is generated? Interrupt is a signal send by an external device to the processor, to the processor to perform a particular task or work. In the microprocessor based system the interrupts are used for data transfer between the peripheral and the microprocessor. When a peripheral is ready for data transfer, it interrupts the processor by sending an appropriate signal to the interrupt pin of the processor. If the processor accepts the interrupt then the processor suspends its current activity and executes an interrupt service subroutine to complete the data transfer between the peripheral and processor. After executing the interrupt service routine the processor resumes its current activity. This type of data transfer scheme is called interrupt driven data transfer scheme. Types Of Interrupt: The interrupts are classified into software interrupts and hardware interrupts. • The software interrupts are program instructions. While running a program, if a software