SlideShare a Scribd company logo
1 of 10
Assembly language
What is Assembly Language?
Each personal computer has a microprocessor that manages the
computer's arithmetical, logical, and control activities.
Each family of processors has its own set of instructions for
handling various operations such as getting input from keyboard,
displaying information on screen and performing various other jobs.
These set of instructions are called 'machine language instructions'.
A processor understands only machine language instructions,
which are strings of 1's and 0's. However, machine language is too
obscure and complex for using in software development. So, the low-
level assembly language is designed for a specific family of processors
that represents various instructions in symbolic code and a more
understandable form.
Assembly language
Why is ASM useful?
Machine language is just a series of numbers, which is not easy for
humans to read. Using ASM, programmers can write human-
readable programs that correspond almost exactly to machine
language.
The disadvantage is that everything the computer does must be
described explicitly, in precise detail. The advantage is that the
programmer has maximum control over what the computer is
doing.
Why is ASM a "low-level" language?
Assembly is called a low-level programming language because
there is (nearly) a one-to-one relationship between what it tells
the computer to do, and what the computer does. In general, one
line of an assembly program contains a maximum of one
instruction for the computer.
Assembly language
How is ASM different from a "high-level" language?
High-level languages provide abstractions of low-level operations
which allow the programmer to focus more on describing what
they want to do, and less on how it should be done. Programming
this way is more convenient and makes programs easier to read at
the sacrifice of low-level control.
Is ASM portable?
No. Because assembly languages are tied to one specific computer
architecture, they are not portable. A program written in one
assembly language would need to be completely rewritten for it to
run on another type of machine.
Assembly language
Advantages of Assembly Language
Having an understanding of assembly language makes one
aware of −
How programs interface with OS, processor, and BIOS;
How data is represented in memory and other external devices;
How the processor accesses and executes instruction;
How instructions access and process data;
How a program accesses external devices.
Other advantages of using assembly language are −
It requires less memory and execution time;
It allows hardware-specific complex jobs in an easier way;
It is suitable for time-critical jobs;
It is most suitable for writing interrupt service routines and
other memory resident programs.
Assembly language
An assembly language program can be divided into 3 sections:-
The data section
The bss section
The text section
The data Section
The data section is used for declaring initialized data or constants.
This data does not change at runtime. You can declare various
constant values, file names, or buffer size, etc., in this section.
The syntax for declaring data section is −
section.data
The bss Section
The bss section is used for declaring variables. The syntax for
declaring bss section is −
section.bss
Assembly language
The text section
The text section is used for keeping the actual code. This section
must begin with the declaration global _start, which tells the
kernel where the program execution begins.
The syntax for declaring text section is −
section.text global _start _start:
how it works:
Most computers come with a specified set of very basic
instructions that correspond to the basic machine operations that
the computer can perform. For example, a "Load" instruction
causes the processor to move a string of bits from a location in the
processor's memory to a special holding place called a register.
Assembly language
Assuming the processor has at least eight registers, each
numbered, the following instruction would move the value (string
of bits of a certain length) at memory location 3000 into the
holding place called register 8:
 The programmer can write a program using a sequence of these
assembler instructions.
This sequence of assembler instructions, known as the
source code or source program, is then specified to the assembler
program when that program is started.
The assembler program takes each program statement in the
source program and generates a corresponding bit stream or
pattern (a series of 0's and 1's of a given length).
L 8,3000
Assembly language
The output of the assembler program is called the object code or
object program relative to the input source program. The
sequence of 0's and 1's that constitute the object program is
sometimes called machine code.
The object program can then be run (or executed) whenever
desired.
Assembler
An assembler is a program that takes basic computer instructions
and converts them into a pattern of bits that the
computer's processor can use to perform its basic operations.
Some people call these instructions assembler language and
others use the term assembly language.
Assembly language
While assembly languages differ between processor architectures, they often
include similar instructions and operators. Below are some examples of
instructions supported by x86 processors.
• MOV - move data from one location to another
• ADD - add two values
• SUB - subtract a value from another value
• PUSH - push data onto a stack
• POP - pop data from a stack
• JMP - jump to another location
• INT - interrupt a process
the following assembly language can be used to add the numbers 3 and 4:
mov eax, 3 - loads 3 into the register "eax"
mov ebx, 4 - loads 4 into the register "ebx"
add eax, ebx, ecx - adds "eax" and "ebx" and stores the result (7) in "ecx"
Assembly language
limitations of assembly language
• No Symbolic names for memory locations. You need to keep track of the exact
memory location that a piece of data is stored. That is, you must manipulate
memory locations directly.
• Hard to read. Although we've made a few improvements by eliminating hex
code, the command names are not always clear.
• Code is still machine dependent. We haven't really moved that far away from
the machine language - just put psuedo-English labels on it. We still need to
rewrite every piece of code for every machine.
• Hard to maintain and debug. Finding mistakes in machine code is difficult.
Correcting them or adding new features can also be a challenge.
• Code must be heavily documented. It's very difficult (if not impossible) to figure
out what a program does by reading the code. Detailed explanation must be
prepared for future coders (including the original programmer) who need to
modify or use the code.

More Related Content

What's hot

RISC and CISC Processors
RISC and CISC ProcessorsRISC and CISC Processors
RISC and CISC ProcessorsAdeel Rasheed
 
High level languages representation
High level languages representationHigh level languages representation
High level languages representationgaurav jain
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithmvishal choudhary
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine CodeProject Student
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
CPU (Central Processing Units)
CPU (Central Processing Units)CPU (Central Processing Units)
CPU (Central Processing Units)Prabin Maharjan
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.CS_GDRCST
 
Primary memory (main memory)
Primary memory (main memory)Primary memory (main memory)
Primary memory (main memory)shah baadshah
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler DesignKuppusamy P
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stackAsif Iqbal
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann ArchitectureChamodi Adikaram
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
memory hierarchy
memory hierarchymemory hierarchy
memory hierarchysreelakshmikv
 
Auxiliary memory
Auxiliary memoryAuxiliary memory
Auxiliary memoryYuvrajVyas2
 
Computer registers
Computer registersComputer registers
Computer registersDeepikaT13
 
Chapter 1-Microprocessors, Microcomputers, and Assembly Language
Chapter 1-Microprocessors, Microcomputers, and Assembly LanguageChapter 1-Microprocessors, Microcomputers, and Assembly Language
Chapter 1-Microprocessors, Microcomputers, and Assembly Languagecmkandemir
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set ArchitectureDilum Bandara
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer languageSanjeev Patel
 

What's hot (20)

RISC and CISC Processors
RISC and CISC ProcessorsRISC and CISC Processors
RISC and CISC Processors
 
High level languages representation
High level languages representationHigh level languages representation
High level languages representation
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine Code
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
CPU (Central Processing Units)
CPU (Central Processing Units)CPU (Central Processing Units)
CPU (Central Processing Units)
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Primary memory (main memory)
Primary memory (main memory)Primary memory (main memory)
Primary memory (main memory)
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
memory hierarchy
memory hierarchymemory hierarchy
memory hierarchy
 
Auxiliary memory
Auxiliary memoryAuxiliary memory
Auxiliary memory
 
Computer registers
Computer registersComputer registers
Computer registers
 
Chapter 1-Microprocessors, Microcomputers, and Assembly Language
Chapter 1-Microprocessors, Microcomputers, and Assembly LanguageChapter 1-Microprocessors, Microcomputers, and Assembly Language
Chapter 1-Microprocessors, Microcomputers, and Assembly Language
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
Cache memory
Cache memoryCache memory
Cache memory
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer language
 

Similar to Assembly language

Lec 01 basic concepts
Lec 01 basic conceptsLec 01 basic concepts
Lec 01 basic conceptsAbdul Khan
 
ASSEMBLY LANGUAGE.pptx
ASSEMBLY LANGUAGE.pptxASSEMBLY LANGUAGE.pptx
ASSEMBLY LANGUAGE.pptxEdFeranil
 
microprocesser-140306112352-phpapp01.pdf
microprocesser-140306112352-phpapp01.pdfmicroprocesser-140306112352-phpapp01.pdf
microprocesser-140306112352-phpapp01.pdfPriyankaRana171346
 
Assembly chapter One.pptx
Assembly chapter One.pptxAssembly chapter One.pptx
Assembly chapter One.pptxssuserb78e291
 
Assembly
AssemblyAssembly
Assemblymanidangi
 
Introduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingIntroduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingRahul P
 
1 Describe different types of Assemblers.Assembly language.docx
 1 Describe different types of Assemblers.Assembly language.docx 1 Describe different types of Assemblers.Assembly language.docx
1 Describe different types of Assemblers.Assembly language.docxaryan532920
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution pptKeerty Smile
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)Ashim Saha
 
Assembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly LangaugeAssembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly Langaugemustafkhalid
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdfKINGZzofYouTube
 
Perfect papers software
Perfect papers   softwarePerfect papers   software
Perfect papers softwareguest0a1ce99
 
Computer languages
Computer languagesComputer languages
Computer languagesBuxoo Abdullah
 
02_Intro to Programming Language.pptx
02_Intro to Programming Language.pptx02_Intro to Programming Language.pptx
02_Intro to Programming Language.pptxJhunBrianAndam
 
Block diagram (computer programming & utilization)
Block diagram (computer programming & utilization)Block diagram (computer programming & utilization)
Block diagram (computer programming & utilization)Digvijaysinh Gohil
 
Language translators
Language translatorsLanguage translators
Language translatorsAditya Sharat
 

Similar to Assembly language (20)

Lec 01 basic concepts
Lec 01 basic conceptsLec 01 basic concepts
Lec 01 basic concepts
 
ASSEMBLY LANGUAGE.pptx
ASSEMBLY LANGUAGE.pptxASSEMBLY LANGUAGE.pptx
ASSEMBLY LANGUAGE.pptx
 
microprocesser-140306112352-phpapp01.pdf
microprocesser-140306112352-phpapp01.pdfmicroprocesser-140306112352-phpapp01.pdf
microprocesser-140306112352-phpapp01.pdf
 
Assembly chapter One.pptx
Assembly chapter One.pptxAssembly chapter One.pptx
Assembly chapter One.pptx
 
Assembly
AssemblyAssembly
Assembly
 
Introduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingIntroduction to Assembly Language Programming
Introduction to Assembly Language Programming
 
1 Describe different types of Assemblers.Assembly language.docx
 1 Describe different types of Assemblers.Assembly language.docx 1 Describe different types of Assemblers.Assembly language.docx
1 Describe different types of Assemblers.Assembly language.docx
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)
 
Assembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly LangaugeAssembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly Langauge
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Ayushi
AyushiAyushi
Ayushi
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
 
Perfect papers software
Perfect papers   softwarePerfect papers   software
Perfect papers software
 
Computer languages
Computer languagesComputer languages
Computer languages
 
02_Intro to Programming Language.pptx
02_Intro to Programming Language.pptx02_Intro to Programming Language.pptx
02_Intro to Programming Language.pptx
 
Block diagram (computer programming & utilization)
Block diagram (computer programming & utilization)Block diagram (computer programming & utilization)
Block diagram (computer programming & utilization)
 
a1.pptx.pdf
a1.pptx.pdfa1.pptx.pdf
a1.pptx.pdf
 
Language translators
Language translatorsLanguage translators
Language translators
 
Software Concepts Notes
Software Concepts NotesSoftware Concepts Notes
Software Concepts Notes
 

More from gaurav jain

Basic ops concept of comp
Basic ops  concept of compBasic ops  concept of comp
Basic ops concept of compgaurav jain
 
Functional units of computer
Functional units of computerFunctional units of computer
Functional units of computergaurav jain
 
Stored program concept
Stored program conceptStored program concept
Stored program conceptgaurav jain
 
Programming languages
Programming languagesProgramming languages
Programming languagesgaurav jain
 
Comprehensive interventions
Comprehensive interventionsComprehensive interventions
Comprehensive interventionsgaurav jain
 
Personal intervention
Personal interventionPersonal intervention
Personal interventiongaurav jain
 
Od interventions
Od interventionsOd interventions
Od interventionsgaurav jain
 
Interpersonal and group process interventions
Interpersonal and group process interventionsInterpersonal and group process interventions
Interpersonal and group process interventionsgaurav jain
 
Organizational effectiveness
Organizational effectivenessOrganizational effectiveness
Organizational effectivenessgaurav jain
 
Organizational change and development
Organizational change and developmentOrganizational change and development
Organizational change and developmentgaurav jain
 
Definition and nature of organizational development
Definition and nature of organizational developmentDefinition and nature of organizational development
Definition and nature of organizational developmentgaurav jain
 
Change agent
Change agentChange agent
Change agentgaurav jain
 
Service sector and economic, growth
Service sector and economic, growthService sector and economic, growth
Service sector and economic, growthgaurav jain
 
Service concept, characteristic and classification
Service concept, characteristic and classificationService concept, characteristic and classification
Service concept, characteristic and classificationgaurav jain
 
Relationship marketing concept, process and importance
Relationship marketing concept, process and importanceRelationship marketing concept, process and importance
Relationship marketing concept, process and importancegaurav jain
 
Marketing for non profit organizations
Marketing for non profit organizationsMarketing for non profit organizations
Marketing for non profit organizationsgaurav jain
 
Creating and delivering services
Creating and delivering servicesCreating and delivering services
Creating and delivering servicesgaurav jain
 
Securing the e marketing site
Securing  the e marketing siteSecuring  the e marketing site
Securing the e marketing sitegaurav jain
 
Ongoing customer communication in e marketing
Ongoing customer communication in e marketingOngoing customer communication in e marketing
Ongoing customer communication in e marketinggaurav jain
 
Ethics of electronic marketing
Ethics of electronic marketingEthics of electronic marketing
Ethics of electronic marketinggaurav jain
 

More from gaurav jain (20)

Basic ops concept of comp
Basic ops  concept of compBasic ops  concept of comp
Basic ops concept of comp
 
Functional units of computer
Functional units of computerFunctional units of computer
Functional units of computer
 
Stored program concept
Stored program conceptStored program concept
Stored program concept
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Comprehensive interventions
Comprehensive interventionsComprehensive interventions
Comprehensive interventions
 
Personal intervention
Personal interventionPersonal intervention
Personal intervention
 
Od interventions
Od interventionsOd interventions
Od interventions
 
Interpersonal and group process interventions
Interpersonal and group process interventionsInterpersonal and group process interventions
Interpersonal and group process interventions
 
Organizational effectiveness
Organizational effectivenessOrganizational effectiveness
Organizational effectiveness
 
Organizational change and development
Organizational change and developmentOrganizational change and development
Organizational change and development
 
Definition and nature of organizational development
Definition and nature of organizational developmentDefinition and nature of organizational development
Definition and nature of organizational development
 
Change agent
Change agentChange agent
Change agent
 
Service sector and economic, growth
Service sector and economic, growthService sector and economic, growth
Service sector and economic, growth
 
Service concept, characteristic and classification
Service concept, characteristic and classificationService concept, characteristic and classification
Service concept, characteristic and classification
 
Relationship marketing concept, process and importance
Relationship marketing concept, process and importanceRelationship marketing concept, process and importance
Relationship marketing concept, process and importance
 
Marketing for non profit organizations
Marketing for non profit organizationsMarketing for non profit organizations
Marketing for non profit organizations
 
Creating and delivering services
Creating and delivering servicesCreating and delivering services
Creating and delivering services
 
Securing the e marketing site
Securing  the e marketing siteSecuring  the e marketing site
Securing the e marketing site
 
Ongoing customer communication in e marketing
Ongoing customer communication in e marketingOngoing customer communication in e marketing
Ongoing customer communication in e marketing
 
Ethics of electronic marketing
Ethics of electronic marketingEthics of electronic marketing
Ethics of electronic marketing
 

Recently uploaded

Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 

Recently uploaded (20)

Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 

Assembly language

  • 1. Assembly language What is Assembly Language? Each personal computer has a microprocessor that manages the computer's arithmetical, logical, and control activities. Each family of processors has its own set of instructions for handling various operations such as getting input from keyboard, displaying information on screen and performing various other jobs. These set of instructions are called 'machine language instructions'. A processor understands only machine language instructions, which are strings of 1's and 0's. However, machine language is too obscure and complex for using in software development. So, the low- level assembly language is designed for a specific family of processors that represents various instructions in symbolic code and a more understandable form.
  • 2. Assembly language Why is ASM useful? Machine language is just a series of numbers, which is not easy for humans to read. Using ASM, programmers can write human- readable programs that correspond almost exactly to machine language. The disadvantage is that everything the computer does must be described explicitly, in precise detail. The advantage is that the programmer has maximum control over what the computer is doing. Why is ASM a "low-level" language? Assembly is called a low-level programming language because there is (nearly) a one-to-one relationship between what it tells the computer to do, and what the computer does. In general, one line of an assembly program contains a maximum of one instruction for the computer.
  • 3. Assembly language How is ASM different from a "high-level" language? High-level languages provide abstractions of low-level operations which allow the programmer to focus more on describing what they want to do, and less on how it should be done. Programming this way is more convenient and makes programs easier to read at the sacrifice of low-level control. Is ASM portable? No. Because assembly languages are tied to one specific computer architecture, they are not portable. A program written in one assembly language would need to be completely rewritten for it to run on another type of machine.
  • 4. Assembly language Advantages of Assembly Language Having an understanding of assembly language makes one aware of − How programs interface with OS, processor, and BIOS; How data is represented in memory and other external devices; How the processor accesses and executes instruction; How instructions access and process data; How a program accesses external devices. Other advantages of using assembly language are − It requires less memory and execution time; It allows hardware-specific complex jobs in an easier way; It is suitable for time-critical jobs; It is most suitable for writing interrupt service routines and other memory resident programs.
  • 5. Assembly language An assembly language program can be divided into 3 sections:- The data section The bss section The text section The data Section The data section is used for declaring initialized data or constants. This data does not change at runtime. You can declare various constant values, file names, or buffer size, etc., in this section. The syntax for declaring data section is − section.data The bss Section The bss section is used for declaring variables. The syntax for declaring bss section is − section.bss
  • 6. Assembly language The text section The text section is used for keeping the actual code. This section must begin with the declaration global _start, which tells the kernel where the program execution begins. The syntax for declaring text section is − section.text global _start _start: how it works: Most computers come with a specified set of very basic instructions that correspond to the basic machine operations that the computer can perform. For example, a "Load" instruction causes the processor to move a string of bits from a location in the processor's memory to a special holding place called a register.
  • 7. Assembly language Assuming the processor has at least eight registers, each numbered, the following instruction would move the value (string of bits of a certain length) at memory location 3000 into the holding place called register 8:  The programmer can write a program using a sequence of these assembler instructions. This sequence of assembler instructions, known as the source code or source program, is then specified to the assembler program when that program is started. The assembler program takes each program statement in the source program and generates a corresponding bit stream or pattern (a series of 0's and 1's of a given length). L 8,3000
  • 8. Assembly language The output of the assembler program is called the object code or object program relative to the input source program. The sequence of 0's and 1's that constitute the object program is sometimes called machine code. The object program can then be run (or executed) whenever desired. Assembler An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer's processor can use to perform its basic operations. Some people call these instructions assembler language and others use the term assembly language.
  • 9. Assembly language While assembly languages differ between processor architectures, they often include similar instructions and operators. Below are some examples of instructions supported by x86 processors. • MOV - move data from one location to another • ADD - add two values • SUB - subtract a value from another value • PUSH - push data onto a stack • POP - pop data from a stack • JMP - jump to another location • INT - interrupt a process the following assembly language can be used to add the numbers 3 and 4: mov eax, 3 - loads 3 into the register "eax" mov ebx, 4 - loads 4 into the register "ebx" add eax, ebx, ecx - adds "eax" and "ebx" and stores the result (7) in "ecx"
  • 10. Assembly language limitations of assembly language • No Symbolic names for memory locations. You need to keep track of the exact memory location that a piece of data is stored. That is, you must manipulate memory locations directly. • Hard to read. Although we've made a few improvements by eliminating hex code, the command names are not always clear. • Code is still machine dependent. We haven't really moved that far away from the machine language - just put psuedo-English labels on it. We still need to rewrite every piece of code for every machine. • Hard to maintain and debug. Finding mistakes in machine code is difficult. Correcting them or adding new features can also be a challenge. • Code must be heavily documented. It's very difficult (if not impossible) to figure out what a program does by reading the code. Detailed explanation must be prepared for future coders (including the original programmer) who need to modify or use the code.