3. A Language Processor is a
software program designed or
used to perform tasks such as
processing program code to
machine code. Language
processors are found in languages
such as C++, Java, etc.
4.
5.
6. ADVANTAGES AND
DISADVANTAGES OF LANGUAGE
PROCESSORS
ADVANTAGES:
Modification of user program can be easily made and implemented as
execution proceeds.
Type of object that denotes a various may change dynamically.
8. AN ASSEMBLER IS A PROGRAM THAT
CONVERTS ASSEMBLY LANGUAGE INTO
MACHINE CODE. IT TAKES THE BASIC
COMMANDS & OPERATIONS FROM
ASSEMBLY CODE AND CONVERTS THEM
INTO BINARY CODE THAT CAN BE
RECOGNISED BY A SPECIFIC TYPE OF
PROCESSOR.
Assembler
Assembly
language
program
Input Output
Machine
language
program
9. ADVANTAGES OF USING
ASSEMBLER
Very fast in translating assembly
language to machine code.
It is often very efficient because it
is a low level language.
11. AN INTERPRETER IS A COMPUTER
PROGRAM, WHICH CONVERTS
EACH HIGH-LEVEL PROGRAM
STATEMENT INTO THE MACHINE
CODE. THIS INCLUDES SOURCE
CODE,PRE-COMPILED CODE &
SCRIPTS.
Interpreter
High level
language
program
Input Output
Result of
program
execution
12. ADVANTAGES OF USING
INTERPRETER
Instructions are executed as soon as they are
translated.
Errors can be quickly spotted- once an error
is found, the program stops running & the
user is notified at which part of the program
the interpretation has failed.
13. DISADVANTAGES OF
USING INTERPRETER
Interpreted programs runs slowly as the
processors has to wait for each instruction to
be translated before it can be executed.
Interpreters do not optimise code- the
translated code is executed as it is.
14. COMPILER
COMPILER IS A TRANSLATOR
PROGRAM THAT IS USED TO CONVERT
A HIGH LEVEL LANGUAGE PROGRAM
INTO MACHINE LANGUAGE. IT
TRANSLATES THE WHOLE PROGRAM
AT ONES AND GENERATES THE OBJECT
CODE ALONG WITH A LIST OF ERRORS
15. ADVANTAGES OF USING
COMPILER
Compiled programs run quickly, since they
have already been translated.
Compilers optimise code. Optimised code can
run quicker and take up less memory space.
A compiled program can be supplied as an
executable file.
16. DISADVANTAGES OF
USING A COMPILER
The source code must be re-compiled every
time the programmer changes the program.
Source code compiled on one platform will not
run on another-the machine code is specific to
the processor’s architecture.