Professional Documents
Culture Documents
COMPILER
INTERPRETER
LINKER
ASSEMBLER
HIGH LEVEL LANGUAGE
Machine independence
Fewer errors
Easy to maintain
LIMITATIONS OF HIGH LEVEL
LANGUAGES
Program P1 in high
level language
L1 Machine code for
Compiler for L1 P1
Machine
Compiler for code for P1 Executed on
language L1 on that will run
computer B
computer B on
computer B
WORKING OF A COMPILER
The compiler, being a program is then executed with the source program as its
input data.
It generates the equivalent object program as its output which is normally saved
in a file on secondary storage.
Whenever there is a need to execute the program the object program is copied
from secondary storage in to the main memory of the computer and
executed.
SECONDARY FUNCTION OF A
COMPILER
Compilers also detect and indicate certain types of errors
in source programs, these errors are called Syntax Errors.
High level
language INTERPRETER (translates Result of
program INPUT and executes statement-by- OUTPUT program
(Source statement) execution
Program)
Less complex
The large size of the file would make it very difficult to work with.e.g.it is
impossible to load the file for compilation on a computer with limited main
memory capacity.
Any change in the source program would require the entire source program
to be recompiled.
WHY IS LINKER REQUIRED ?...PART 2
FUNCTIONING OF MODULAR APPROACH
Modular approach divides the software into functional modules and separate
source programs are written for each module of the software.
Often ,there is no need to even write source programs for some of the modules ,
because there might be programs available in a program library.
Examples:GoAsm,TASM(Turbo Assembler
Software), MASM,X86(-64),MIPS…etc.
TRANSLATION PROCESS OF
AN ASSEMBLER
Assembly Machine
language INPUT ASSEMBLER OUTPUT language
program program
One-to-one correspondence
(Source Program) (Object Program)
BASIS OF DISTINCTION COMPILER ASSEMBLER
MEMORY SPACE Require more memory space for Doesn’t require memory
execution. space for execution.