SlideShare a Scribd company logo
1 of 6
ASSEMBLER, COMPILER AND INTERPRETER
A program is a set of instructions for performing a particular task. These instructions are
just like English words. The computer interprets the instructions as 1's and 0's. A program
can be written in assembly language as well as in high-level language. This written
program is called the source program. The source program is to be converted to the
machine language, which is called an object program. A translator is required for such a
translation.
Program translator translates source code of programming language into machine
language-instruction code. Generally, computer programs are written in languages like
COBOL, C, BASIC and ASSEMBLY LANGUAGE, which should be translated into
machine language before execution. Programming language translators are classified as
follows.
Translators are as follows.
i. Assembler
ii. Compiler
iii. Interpreter
ASSEMBLER: An assembler translates the symbolic codes of programs of an
assembly language into machine language instructions .The symbolic language is
translated to the machine code in the ratio of one is to one symbolic instructions to one
machine code instructions. Such types of languages are called low-level languages. The
assembler programs translate the low-level language to the machine code. The translation
job is performed either manually or with a program called assembler. In hand assembly,
the programmer uses the set of instructions supplied by the manufacturer. In this case, the
hexadecimal code for the mnemonic instruction is searched from the code sheet. This
procedure is tedious and time-consuming. Alternate solution to this is the use of
assemblers. The program called assembler provides the codes of the mnemonics. This
process is fast and facilitates the user in developing the program speedily. Assembler is
software or a tool that translates Assembly language to machine code. So, an assembler is
a type of a compiler and the source code is written in Assembly language. Assembly is a
human readable language but it typically has a one to one relationship with the
corresponding machine code. Therefore an assembler is said to perform isomorphic (one
to one mapping) translation. Advanced assemblers provide additional features that
support program development and debugging processes. For example, the type of
assemblers called macro assemblers provides a macro facility.
COMPILER: Compilers are the translators, which translate all the instructions of the
program into machine codes, which can be used again and again The program, which is
to be translated, is called the source program and after translation the object code is
generated. The source program is input to the compiler. The object code is output for the
secondary storage device. The entire program will be read by the compiler first and
generates the object code. However, in interpreter each line is executed and object code is
provided. M-BASIC is an example of an interpreter. High-level languages such as C, C+
+ and Java compilers are employed. The compiler displays the list of errors and warnings
for the statements violating the syntax rules of the language. Compilers also have the
ability of linking subroutines of the program. In general, compiler is a computer program
that reads a program written in one language, which is called the source language, and
translates it in to another language, which is called the target language. Traditionally,
source language is a high level language such as C++ and target language is a low level
language such as Assembly language. However, there are compilers that can convert a
source program written in Assembly language and convert it to machine code or object
code. Assemblers are such tools. On the other hand, Interpreters are tools that execute
instructions written in some programming language. Interpreter can either directly
execute high level source code or translate them to intermediate code and then interpret it
or execute precompiled code.
INTERPRETER: Interpreters also come in the group of translators. It helps the user
to execute the source program with a few differences as compared to compilers. The
source program is just like English statements in both interpreters and compilers. The
interpreter generates object codes for the source program. Interpreter reads the program
line by line, whereas in compiler the entire program is read by the compiler, which then
generates the object codes. Interpreter directly executes the program from its source code.
Due to this, every time the source code should be inputted to the interpreter. In other
words, each line is converted into the object codes. It takes very less time for execution
because no intermediate object code is generated. An interpreter is a computer program
or a tool that executes programming instructions. An interpreter may either execute the
source code directly or converts the source to an intermediate code and execute it directly
or execute precompiled code produced by a compiler (some interpreter systems include a
compiler for this task). Languages like Perl, Python, MATLAB and Ruby are examples
of programming languages that use an intermediate code. UCSD Pascal interprets a
precompiled code. Languages like Java, BASIC and Smalltalk first compile the source to
an intermediate code called byte code and then interpret it.
Compiler V/s Interpreter V/s Assembler
Compiler
1. Compiler translates a high level language program into machine level language.
2. Translates each high level language instruction into a set of machine level instructions
3.one to much correspondence.
4. Examples are C, COBOL, Java, etc. .
Interpreter
1. Compiler translates a high level language program into machine level language.
2. It takes one statement of a high level language program, translates it into machine
language instructions and immediately executes it.
3. A one to one relationship with the corresponding machine code
4.Languages like Java, BASIC and Smalltalk first compile the source to an
intermediate code called byte code and then interpret it.
Assembler
1. Assembler translates a assembly language program into machine level language.
2. It takes one statement of a assembly language program, translates it into machine
language instructions and immediately executes it.
3. Typically has a one to one relationship with the corresponding machine code
Assembler
1. Assembler translates a assembly language program into machine level language.
2. It takes one statement of a assembly language program, translates it into machine
language instructions and immediately executes it.
3. Typically has a one to one relationship with the corresponding machine code

More Related Content

What's hot

What's hot (20)

compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
 
How a Compiler Works ?
How a Compiler Works ?How a Compiler Works ?
How a Compiler Works ?
 
What is Compiler?
What is Compiler?What is Compiler?
What is Compiler?
 
Introduction to compiler interpreter
Introduction to compiler interpreterIntroduction to compiler interpreter
Introduction to compiler interpreter
 
Types of system software
Types of system softwareTypes of system software
Types of system software
 
Interpreter
InterpreterInterpreter
Interpreter
 
Compiler interpreter and_bootstrapping
Compiler interpreter and_bootstrappingCompiler interpreter and_bootstrapping
Compiler interpreter and_bootstrapping
 
Interpreted and compiled language
Interpreted and compiled languageInterpreted and compiled language
Interpreted and compiled language
 
Language Translator ( Compiler)
Language Translator ( Compiler)Language Translator ( Compiler)
Language Translator ( Compiler)
 
Compilers
CompilersCompilers
Compilers
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis: COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis:
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
 
compiler and their types
compiler and their typescompiler and their types
compiler and their types
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
 
Ppt 1
Ppt 1Ppt 1
Ppt 1
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
 

Similar to Assembler

Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide shareSudhaa Ravi
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSsonalikharade3
 
Computer languages
Computer languagesComputer languages
Computer languagesPrince Arsal
 
Chapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxChapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxdawod yimer
 
Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpretersshivasdhtsvmic
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfHarshaVardhan196987
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer programAbhay Kumar
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdfRakibRahman19
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNoel Malle
 
Computer assignment for grade 9
Computer assignment for grade  9Computer assignment for grade  9
Computer assignment for grade 9nahomyitbarek
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler developmentDeepOad
 
Programming Languages
Programming LanguagesProgramming Languages
Programming LanguagesMohamed Omar
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdfKINGZzofYouTube
 
lce1 مترجمات.pptx
lce1 مترجمات.pptxlce1 مترجمات.pptx
lce1 مترجمات.pptxSamiAAli44
 

Similar to Assembler (20)

Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide share
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
 
COMPILER DESIGN.docx
COMPILER DESIGN.docxCOMPILER DESIGN.docx
COMPILER DESIGN.docx
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Chapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxChapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptx
 
Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpreters
 
C_NOTES.pdf
C_NOTES.pdfC_NOTES.pdf
C_NOTES.pdf
 
Presentation
PresentationPresentation
Presentation
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdf
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdf
 
Computer language
Computer languageComputer language
Computer language
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Computer assignment for grade 9
Computer assignment for grade  9Computer assignment for grade  9
Computer assignment for grade 9
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
Unit 1
Unit 1Unit 1
Unit 1
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
 
lce1 مترجمات.pptx
lce1 مترجمات.pptxlce1 مترجمات.pptx
lce1 مترجمات.pptx
 

More from Suneel Dogra

Distributed databases
Distributed databasesDistributed databases
Distributed databasesSuneel Dogra
 
Data base management system
Data base management systemData base management system
Data base management systemSuneel Dogra
 
Web sitedesignpart1
Web sitedesignpart1Web sitedesignpart1
Web sitedesignpart1Suneel Dogra
 
Web sitedesignpart1
Web sitedesignpart1Web sitedesignpart1
Web sitedesignpart1Suneel Dogra
 
He 12 different types of servers that every techie should know about
He 12 different types of servers that every techie should know aboutHe 12 different types of servers that every techie should know about
He 12 different types of servers that every techie should know aboutSuneel Dogra
 
Bachelor of computer application b.c.a.-2014
Bachelor of computer application b.c.a.-2014Bachelor of computer application b.c.a.-2014
Bachelor of computer application b.c.a.-2014Suneel Dogra
 
Cloud computing application
Cloud computing applicationCloud computing application
Cloud computing applicationSuneel Dogra
 
Fast track to linux
Fast track to linuxFast track to linux
Fast track to linuxSuneel Dogra
 
A sorted linear array
A sorted linear array A sorted linear array
A sorted linear array Suneel Dogra
 

More from Suneel Dogra (20)

Business model
Business modelBusiness model
Business model
 
Internet
InternetInternet
Internet
 
Html
HtmlHtml
Html
 
Dreamweaver
DreamweaverDreamweaver
Dreamweaver
 
Advanced html
Advanced htmlAdvanced html
Advanced html
 
Sql
SqlSql
Sql
 
File organisation
File organisationFile organisation
File organisation
 
Distributed databases
Distributed databasesDistributed databases
Distributed databases
 
Database models
Database models Database models
Database models
 
Data base management system
Data base management systemData base management system
Data base management system
 
Web sitedesignpart1
Web sitedesignpart1Web sitedesignpart1
Web sitedesignpart1
 
Web sitedesignpart1
Web sitedesignpart1Web sitedesignpart1
Web sitedesignpart1
 
Internet security
Internet securityInternet security
Internet security
 
What is the linux
What is the linuxWhat is the linux
What is the linux
 
He 12 different types of servers that every techie should know about
He 12 different types of servers that every techie should know aboutHe 12 different types of servers that every techie should know about
He 12 different types of servers that every techie should know about
 
Bachelor of computer application b.c.a.-2014
Bachelor of computer application b.c.a.-2014Bachelor of computer application b.c.a.-2014
Bachelor of computer application b.c.a.-2014
 
Cloud computing application
Cloud computing applicationCloud computing application
Cloud computing application
 
Fast track to linux
Fast track to linuxFast track to linux
Fast track to linux
 
A sorted linear array
A sorted linear array A sorted linear array
A sorted linear array
 
String in c
String in cString in c
String in c
 

Recently uploaded

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Assembler

  • 1. ASSEMBLER, COMPILER AND INTERPRETER A program is a set of instructions for performing a particular task. These instructions are just like English words. The computer interprets the instructions as 1's and 0's. A program can be written in assembly language as well as in high-level language. This written program is called the source program. The source program is to be converted to the machine language, which is called an object program. A translator is required for such a translation. Program translator translates source code of programming language into machine language-instruction code. Generally, computer programs are written in languages like COBOL, C, BASIC and ASSEMBLY LANGUAGE, which should be translated into machine language before execution. Programming language translators are classified as follows. Translators are as follows. i. Assembler ii. Compiler iii. Interpreter
  • 2. ASSEMBLER: An assembler translates the symbolic codes of programs of an assembly language into machine language instructions .The symbolic language is translated to the machine code in the ratio of one is to one symbolic instructions to one machine code instructions. Such types of languages are called low-level languages. The assembler programs translate the low-level language to the machine code. The translation job is performed either manually or with a program called assembler. In hand assembly, the programmer uses the set of instructions supplied by the manufacturer. In this case, the hexadecimal code for the mnemonic instruction is searched from the code sheet. This procedure is tedious and time-consuming. Alternate solution to this is the use of assemblers. The program called assembler provides the codes of the mnemonics. This process is fast and facilitates the user in developing the program speedily. Assembler is software or a tool that translates Assembly language to machine code. So, an assembler is a type of a compiler and the source code is written in Assembly language. Assembly is a human readable language but it typically has a one to one relationship with the corresponding machine code. Therefore an assembler is said to perform isomorphic (one to one mapping) translation. Advanced assemblers provide additional features that support program development and debugging processes. For example, the type of assemblers called macro assemblers provides a macro facility. COMPILER: Compilers are the translators, which translate all the instructions of the program into machine codes, which can be used again and again The program, which is to be translated, is called the source program and after translation the object code is
  • 3. generated. The source program is input to the compiler. The object code is output for the secondary storage device. The entire program will be read by the compiler first and generates the object code. However, in interpreter each line is executed and object code is provided. M-BASIC is an example of an interpreter. High-level languages such as C, C+ + and Java compilers are employed. The compiler displays the list of errors and warnings for the statements violating the syntax rules of the language. Compilers also have the ability of linking subroutines of the program. In general, compiler is a computer program that reads a program written in one language, which is called the source language, and translates it in to another language, which is called the target language. Traditionally, source language is a high level language such as C++ and target language is a low level language such as Assembly language. However, there are compilers that can convert a source program written in Assembly language and convert it to machine code or object code. Assemblers are such tools. On the other hand, Interpreters are tools that execute instructions written in some programming language. Interpreter can either directly execute high level source code or translate them to intermediate code and then interpret it or execute precompiled code. INTERPRETER: Interpreters also come in the group of translators. It helps the user to execute the source program with a few differences as compared to compilers. The source program is just like English statements in both interpreters and compilers. The interpreter generates object codes for the source program. Interpreter reads the program line by line, whereas in compiler the entire program is read by the compiler, which then generates the object codes. Interpreter directly executes the program from its source code. Due to this, every time the source code should be inputted to the interpreter. In other words, each line is converted into the object codes. It takes very less time for execution
  • 4. because no intermediate object code is generated. An interpreter is a computer program or a tool that executes programming instructions. An interpreter may either execute the source code directly or converts the source to an intermediate code and execute it directly or execute precompiled code produced by a compiler (some interpreter systems include a compiler for this task). Languages like Perl, Python, MATLAB and Ruby are examples of programming languages that use an intermediate code. UCSD Pascal interprets a precompiled code. Languages like Java, BASIC and Smalltalk first compile the source to an intermediate code called byte code and then interpret it. Compiler V/s Interpreter V/s Assembler Compiler 1. Compiler translates a high level language program into machine level language. 2. Translates each high level language instruction into a set of machine level instructions 3.one to much correspondence. 4. Examples are C, COBOL, Java, etc. . Interpreter 1. Compiler translates a high level language program into machine level language. 2. It takes one statement of a high level language program, translates it into machine language instructions and immediately executes it. 3. A one to one relationship with the corresponding machine code 4.Languages like Java, BASIC and Smalltalk first compile the source to an intermediate code called byte code and then interpret it.
  • 5. Assembler 1. Assembler translates a assembly language program into machine level language. 2. It takes one statement of a assembly language program, translates it into machine language instructions and immediately executes it. 3. Typically has a one to one relationship with the corresponding machine code
  • 6. Assembler 1. Assembler translates a assembly language program into machine level language. 2. It takes one statement of a assembly language program, translates it into machine language instructions and immediately executes it. 3. Typically has a one to one relationship with the corresponding machine code