SlideShare a Scribd company logo
Assembly Language
Here’s what a program-fragment looks like:
10100001 10111100 10010011 00000100
00001000 00000011 00000101 11000000
10010011 00000100 00001000 10100011
11000000 10010100 00000100 00001000
It means: z = x + y;
 Machine language
 Native to a processor: executed directly by hardware
 Instructions consist of binary code: 1s and 0s
 Assembly language
 A programming language that uses symbolic names to represent
operations, registers and memory locations.
 Slightly higher-level language
 Readability of instructions is better than machine language
 One-to-one correspondence with machine language instructions
 Assemblers translate assembly to machine code
 Compilers translate high-level programs to machine code
 Either directly, or
 Indirectly via an assembler
 Software tools are needed for editing, assembling, linking,
and debugging assembly language programs
 An assembler is a program that converts source-code
programs written in assembly language into object files in
machine language
 Popular assemblers have emerged over the years for the
Intel family of processors. These include …
 TASM (Turbo Assembler from Borland)
 NASM (Netwide Assembler for both Windows and Linux), and
 GNU assembler distributed by the free software foundation
 In assembly language, mnemonics are used
to specify an opcode that represents a
complete and operational machine language
instruction. This is later translated by the
assembler to generate the object code. For
example, the mnemonic MOV is used in
assembly language for copying and moving
data between registers and memory
locations.
 Each command of a program is called an instruction (it
instructs the computer what to do).
 Computers only deal with binary data, hence the
instructions must be in binary format (0s and 1s) .
 The set of all instructions (in binary form) makes up the
computer's machine language. This is also referred to as
the instruction set.
 Machine language instructions usually are made up of
several fields. Each field specifies different information
for the computer. The major two fields are:
 Opcode field which stands for operation code and it
specifies the particular operation that is to be performed.
 Each operation has its unique opcode.
 Operands fields which specify where to get the source
and destination operands for the operation specified by
the opcode.
 The source/destination of operands can be a constant, the
memory or one of the general-purpose registers.
 Built from two pieces
Add R1, R3, 3
Opcode
What to do
with the data
(ALU
operation)
Operands
Where to
get data and
put the
results
 Arithmetic, logical
◦ add, sub, mult
◦ and, or
◦ Cmp
 Memory load/store
◦ ld, st
 Control transfer
◦ jmp
◦ bne
 Complex
◦ movs
 Each operand taken from a particular
addressing mode:
 Examples:
Register add r1, r2, r3
Immediate add r1, r2, 10
Indirect mov r1, (r2)
Offset mov r1, 10(r3)
PC Relative beq 100
 Reflect processor data pathways
 ASCII, American Standard Code for
Information Interchange, is a scheme used for
assigning numeric values to punctuation
marks, spaces, numbers and other
characters. ASCII uses 7 bits to represent
characters. The values 000 0000 through 111
1111 or 00 through 7F are used giving ASCII
the ability to represent 128 different
characters. An extended version of ASCII
assigns characters from 80 through FF.
 Accessibility to system hardware
 Assembly Language is useful for implementing system software
 Also useful for small embedded system applications
 Space and Time efficiency
 Understanding sources of program inefficiency
 Tuning program performance
 Writing compact code
 Writing assembly programs gives the computer designer the needed
deep understanding of the instruction set and how to design one
 To be able to write compilers for HLLs, we need to be expert with
the machine language. Assembly programming provides this
experience
1. Shows how program interfaces with the processor,
operating system, and BIOS.
2. Shows how data is represented and stored in
memory and on external devices.
3. Clarifies how processor accesses and executes
instructions and how instructions access and
process data.
4. Clarifies how a program accesses external devices.
 1. Assembly Language is used when speed and
reliability are the overriding factor like small
footprint real-time operating systems.
2. By using assembly language, programmers can
maximize on speed to a level. It is easy to write
than machine code programs.
3. It allows the programmer access to registers or
instructions that are not usually provided by a
High-level language.
4. The main Application of Assembly Language is
for direct hardware manipulation i.e. device
drivers.
5. Assembly language also directly correlates
which machine instructions; the only way to get
closer to the machine is to write in binary or hex
code.
microprocesser-140306112352-phpapp01.pdf
microprocesser-140306112352-phpapp01.pdf

More Related Content

Similar to microprocesser-140306112352-phpapp01.pdf

PPS UNIT 1- R18.docx
PPS UNIT 1- R18.docxPPS UNIT 1- R18.docx
PPS UNIT 1- R18.docx
Uzma1102
 
Assembly language
Assembly languageAssembly language
Assembly language
gaurav jain
 
intro to assembly language.pptx
intro to assembly language.pptxintro to assembly language.pptx
intro to assembly language.pptx
EdFeranil
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
Vishwas459764
 
Introduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptxIntroduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptx
SheharBano86
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
Keerty Smile
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
tharwatabdulhmed
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)
Chao-Lung Yang
 
Assembly
AssemblyAssembly
Assembly
manidangi
 
CISY 105 Chapter 1
CISY 105 Chapter 1CISY 105 Chapter 1
CISY 105 Chapter 1
Jackie Marshall
 
Enee114 01
Enee114 01Enee114 01
Enee114 01
Oguz Soysal
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)
Maliha Jahan
 
Description of programming language
Description of programming languageDescription of programming language
Description of programming language
Sam Stratford
 
learn c programing language with us full pdf
learn c programing language with us full pdflearn c programing language with us full pdf
learn c programing language with us full pdf
bhagadeakshay97
 
Cf&oa
Cf&oaCf&oa
Cf&oa
Mohd Nazim
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
KINGZzofYouTube
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)
Ashim Saha
 
A&a&r&n
A&a&r&nA&a&r&n
aula
aulaaula

Similar to microprocesser-140306112352-phpapp01.pdf (20)

PPS UNIT 1- R18.docx
PPS UNIT 1- R18.docxPPS UNIT 1- R18.docx
PPS UNIT 1- R18.docx
 
Assembly language
Assembly languageAssembly language
Assembly language
 
intro to assembly language.pptx
intro to assembly language.pptxintro to assembly language.pptx
intro to assembly language.pptx
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
 
Introduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptxIntroduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptx
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)
 
Assembly
AssemblyAssembly
Assembly
 
CISY 105 Chapter 1
CISY 105 Chapter 1CISY 105 Chapter 1
CISY 105 Chapter 1
 
Enee114 01
Enee114 01Enee114 01
Enee114 01
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)
 
Description of programming language
Description of programming languageDescription of programming language
Description of programming language
 
learn c programing language with us full pdf
learn c programing language with us full pdflearn c programing language with us full pdf
learn c programing language with us full pdf
 
Cf&oa
Cf&oaCf&oa
Cf&oa
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)
 
A&a&r&n
A&a&r&nA&a&r&n
A&a&r&n
 
aula
aulaaula
aula
 

Recently uploaded

Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
shivani5543
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 

Recently uploaded (20)

Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 

microprocesser-140306112352-phpapp01.pdf

  • 2.
  • 3. Here’s what a program-fragment looks like: 10100001 10111100 10010011 00000100 00001000 00000011 00000101 11000000 10010011 00000100 00001000 10100011 11000000 10010100 00000100 00001000 It means: z = x + y;
  • 4.  Machine language  Native to a processor: executed directly by hardware  Instructions consist of binary code: 1s and 0s  Assembly language  A programming language that uses symbolic names to represent operations, registers and memory locations.  Slightly higher-level language  Readability of instructions is better than machine language  One-to-one correspondence with machine language instructions  Assemblers translate assembly to machine code  Compilers translate high-level programs to machine code  Either directly, or  Indirectly via an assembler
  • 5.
  • 6.  Software tools are needed for editing, assembling, linking, and debugging assembly language programs  An assembler is a program that converts source-code programs written in assembly language into object files in machine language  Popular assemblers have emerged over the years for the Intel family of processors. These include …  TASM (Turbo Assembler from Borland)  NASM (Netwide Assembler for both Windows and Linux), and  GNU assembler distributed by the free software foundation
  • 7.  In assembly language, mnemonics are used to specify an opcode that represents a complete and operational machine language instruction. This is later translated by the assembler to generate the object code. For example, the mnemonic MOV is used in assembly language for copying and moving data between registers and memory locations.
  • 8.  Each command of a program is called an instruction (it instructs the computer what to do).  Computers only deal with binary data, hence the instructions must be in binary format (0s and 1s) .  The set of all instructions (in binary form) makes up the computer's machine language. This is also referred to as the instruction set.
  • 9.  Machine language instructions usually are made up of several fields. Each field specifies different information for the computer. The major two fields are:  Opcode field which stands for operation code and it specifies the particular operation that is to be performed.  Each operation has its unique opcode.  Operands fields which specify where to get the source and destination operands for the operation specified by the opcode.  The source/destination of operands can be a constant, the memory or one of the general-purpose registers.
  • 10.  Built from two pieces Add R1, R3, 3 Opcode What to do with the data (ALU operation) Operands Where to get data and put the results
  • 11.  Arithmetic, logical ◦ add, sub, mult ◦ and, or ◦ Cmp  Memory load/store ◦ ld, st  Control transfer ◦ jmp ◦ bne  Complex ◦ movs
  • 12.  Each operand taken from a particular addressing mode:  Examples: Register add r1, r2, r3 Immediate add r1, r2, 10 Indirect mov r1, (r2) Offset mov r1, 10(r3) PC Relative beq 100  Reflect processor data pathways
  • 13.
  • 14.
  • 15.  ASCII, American Standard Code for Information Interchange, is a scheme used for assigning numeric values to punctuation marks, spaces, numbers and other characters. ASCII uses 7 bits to represent characters. The values 000 0000 through 111 1111 or 00 through 7F are used giving ASCII the ability to represent 128 different characters. An extended version of ASCII assigns characters from 80 through FF.
  • 16.  Accessibility to system hardware  Assembly Language is useful for implementing system software  Also useful for small embedded system applications  Space and Time efficiency  Understanding sources of program inefficiency  Tuning program performance  Writing compact code  Writing assembly programs gives the computer designer the needed deep understanding of the instruction set and how to design one  To be able to write compilers for HLLs, we need to be expert with the machine language. Assembly programming provides this experience
  • 17. 1. Shows how program interfaces with the processor, operating system, and BIOS. 2. Shows how data is represented and stored in memory and on external devices. 3. Clarifies how processor accesses and executes instructions and how instructions access and process data. 4. Clarifies how a program accesses external devices.
  • 18.  1. Assembly Language is used when speed and reliability are the overriding factor like small footprint real-time operating systems. 2. By using assembly language, programmers can maximize on speed to a level. It is easy to write than machine code programs. 3. It allows the programmer access to registers or instructions that are not usually provided by a High-level language. 4. The main Application of Assembly Language is for direct hardware manipulation i.e. device drivers. 5. Assembly language also directly correlates which machine instructions; the only way to get closer to the machine is to write in binary or hex code.