USE OF A COMPILER | WHAT IS A COMPILER | WORKING OF COMPILER

INTRODUCTION

USE OF A COMPILER | WHAT IS A COMPILER | WORKING OF COMPILER – We write our program in a high-level language only. It has to be converted into machine language for the computer to understand.

The program that performs this action is called a compiler. A compiler is required for all other high-level languages ​​except one basic language.

But the compiler of a particular language runs on the same language. It cannot be used for any other language. The French language compiler, COBOL, for example, is useless.

USE OF A COMPILER | WHAT IS A COMPILER | WORKING OF COMPILER

If you write a program in any high-level language, it is called a source program, and if it is converted to machine language, it is called an object program.

Before an object program can be executed by a computer, it must be integrated with other object programs.

USE OF A COMPILER | WHAT IS A COMPILER | WORKING OF COMPILER

These programs require the central processing unit to process the original object program.

For example, many computers cannot simply extract the square root of a given number. They rely on a small subprogram to perform this action.

This program is stored in computer memory in the form of an object program, in machine language.

If the original object program contains instructions to remove the square root, then the operating system will associate this square root with the original object program.

The new program that is created so that it can execute the original program combined with various sub-programs is called an ‘executable package’. The process of combining two programs is called ‘linkage editing’.

Executable packages are called ‘load modules‘. The computer implements this load module. Object programs and load modules can be stored permanently on a floppy disk.

Then there is no need to re-compile and link for that particular source program.

READ MORE