SlideShare a Scribd company logo
1 of 33
Chapter 2 Instructions: Language of the Computer
Producing an Object Module ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Linking Object Modules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Loading a Program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Dynamic Linking ,[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Lazy Linkage Chapter 2 — Instructions: Language of the Computer —  Indirection table Stub: Loads routine ID, Jump to linker/loader Linker/loader code Dynamically mapped code
Starting Java Applications Chapter 2 — Instructions: Language of the Computer —  Simple portable instruction set for the JVM Interprets bytecodes Compiles bytecodes of “hot” methods into native code for host machine
C Sort Example ,[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  §2.13 A C Sort Example to Put It All Together
The Procedure Swap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
The Sort Procedure in C ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
The Procedure Body ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  Pass params & call Move params Inner loop Outer loop Inner loop Outer loop
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The Full Procedure Chapter 2 — Instructions: Language of the Computer —
Effect of Compiler Optimization Chapter 2 — Instructions: Language of the Computer —  Compiled with gcc for Pentium 4 under Linux
Effect of Language and Algorithm Chapter 2 — Instructions: Language of the Computer —
Lessons Learnt ,[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Arrays vs. Pointers ,[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  §2.14 Arrays versus Pointers
Example: Clearing and Array Chapter 2 — Instructions: Language of the Computer —  clear1(int array[], int size) { int i; for (i = 0; i < size; i += 1) array[i] = 0; } clear2(int *array, int size) { int *p; for (p = &array[0]; p < &array[size]; p = p + 1) *p = 0; } move $t0,$zero  # i = 0 loop1: sll $t1,$t0,2  # $t1 = i * 4 add $t2,$a0,$t1  # $t2 = #  &array[i] sw $zero, 0($t2) # array[i] = 0 addi $t0,$t0,1  # i = i + 1 slt $t3,$t0,$a1  # $t3 = #  (i < size) bne $t3,$zero,loop1 # if (…)   # goto loop1 move $t0, $a0   # p = & array[0] sll $t1, $a1 ,2  # $t1 =  size  * 4 add $t2,$a0,$t1 # $t2 = #  &array[ size ] loop2:  sw $zero,0( $t0 ) #  Memory[p]  = 0 addi $t0,$t0, 4   #  p = p + 4 slt $t3,$t0, $t2  # $t3 = #( p<&array[size] ) bne $t3,$zero,loop2 # if (…) # goto loop2
Comparison of Array vs. Ptr ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
ARM & MIPS Similarities ,[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  §2.16 Real Stuff: ARM Instructions ARM MIPS Date announced 1985 1985 Instruction size 32 bits 32 bits Address space 32-bit flat 32-bit flat Data alignment Aligned Aligned Data addressing modes 9 3 Registers 15  × 32-bit 31  × 32-bit Input/output Memory mapped Memory mapped
Compare and Branch in ARM ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Instruction Encoding Chapter 2 — Instructions: Language of the Computer —
The Intel x86 ISA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  §2.17 Real Stuff: x86 Instructions
The Intel x86 ISA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
The Intel x86 ISA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Basic x86 Registers Chapter 2 — Instructions: Language of the Computer —
Basic x86 Addressing Modes ,[object Object],Chapter 2 — Instructions: Language of the Computer —  ,[object Object],[object Object],[object Object],[object Object],[object Object],Source/dest operand Second source operand Register Register Register Immediate Register Memory Memory Register Memory Immediate
x86 Instruction Encoding ,[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Implementing IA-32 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Fallacies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  §2.18 Fallacies and Pitfalls
Fallacies ,[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  x86 instruction set
Pitfalls ,[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —
Concluding Remarks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  §2.19 Concluding Remarks
Concluding Remarks ,[object Object],[object Object],[object Object],Chapter 2 — Instructions: Language of the Computer —  Instruction class MIPS examples SPEC2006 Int SPEC2006 FP Arithmetic add, sub, addi 16% 48% Data transfer lw, sw, lb, lbu, lh, lhu, sb, lui 35% 36% Logical and, or, nor, andi, ori, sll, srl 12% 4% Cond. Branch beq, bne, slt, slti, sltiu 34% 8% Jump j, jr, jal 2% 0%

More Related Content

What's hot

Chapter 4 The Processor
Chapter 4 The ProcessorChapter 4 The Processor
Chapter 4 The Processorguest4f73554
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Khaja Dileef
 
Instruction Set Architecture
Instruction  Set ArchitectureInstruction  Set Architecture
Instruction Set ArchitectureHaris456
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branchingJyotiprakashMishra18
 
Logic design and switching theory
Logic design and switching theoryLogic design and switching theory
Logic design and switching theoryjomerson remorosa
 
isa architecture
isa architectureisa architecture
isa architectureAJAL A J
 
Chapter 03 number system
Chapter 03 number systemChapter 03 number system
Chapter 03 number systemIIUI
 
isa architecture
isa architectureisa architecture
isa architectureAJAL A J
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
Cmps290 classnoteschap02
Cmps290 classnoteschap02Cmps290 classnoteschap02
Cmps290 classnoteschap02HussnainSarmad
 
Cse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogrammingCse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogrammingMd. Ashikur Rahman
 
05 instruction set design and architecture
05 instruction set design and architecture05 instruction set design and architecture
05 instruction set design and architectureWaqar Jamil
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmeticIIUI
 

What's hot (20)

MIPS Architecture
MIPS ArchitectureMIPS Architecture
MIPS Architecture
 
Mips architecture
Mips architectureMips architecture
Mips architecture
 
Chapter 4 The Processor
Chapter 4 The ProcessorChapter 4 The Processor
Chapter 4 The Processor
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2
 
Instruction Set Architecture
Instruction  Set ArchitectureInstruction  Set Architecture
Instruction Set Architecture
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branching
 
06 mips-isa
06 mips-isa06 mips-isa
06 mips-isa
 
Logic design and switching theory
Logic design and switching theoryLogic design and switching theory
Logic design and switching theory
 
isa architecture
isa architectureisa architecture
isa architecture
 
Chapter 03 number system
Chapter 03 number systemChapter 03 number system
Chapter 03 number system
 
It322 intro 3
It322 intro 3It322 intro 3
It322 intro 3
 
isa architecture
isa architectureisa architecture
isa architecture
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Gr2512211225
Gr2512211225Gr2512211225
Gr2512211225
 
Cmps290 classnoteschap02
Cmps290 classnoteschap02Cmps290 classnoteschap02
Cmps290 classnoteschap02
 
Cse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogrammingCse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogramming
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
05 instruction set design and architecture
05 instruction set design and architecture05 instruction set design and architecture
05 instruction set design and architecture
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmetic
 
Mcsl 17 ALP lab manual
Mcsl 17 ALP lab manualMcsl 17 ALP lab manual
Mcsl 17 ALP lab manual
 

Viewers also liked

NROC Course Swap Monterey
NROC Course Swap MontereyNROC Course Swap Monterey
NROC Course Swap Montereyrrominger
 
Chapter 2 Hw
Chapter 2 HwChapter 2 Hw
Chapter 2 Hwececourse
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5Motaz Saad
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1Motaz Saad
 
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...vtunotesbysree
 

Viewers also liked (11)

NROC Course Swap Monterey
NROC Course Swap MontereyNROC Course Swap Monterey
NROC Course Swap Monterey
 
SWAP Badge Class
SWAP Badge ClassSWAP Badge Class
SWAP Badge Class
 
Assembly
AssemblyAssembly
Assembly
 
Chapter 2 Hw
Chapter 2 HwChapter 2 Hw
Chapter 2 Hw
 
Chapter 5 a
Chapter 5 aChapter 5 a
Chapter 5 a
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
 

Similar to Chapter 2 Part2 C

MIPS_Programming.pdf
MIPS_Programming.pdfMIPS_Programming.pdf
MIPS_Programming.pdfXxUnnathxX
 
Getting Started with Raspberry Pi - DCC 2013.1
Getting Started with Raspberry Pi - DCC 2013.1Getting Started with Raspberry Pi - DCC 2013.1
Getting Started with Raspberry Pi - DCC 2013.1Tom Paulus
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerMarina Kolpakova
 
Lecture 2 coal sping12
Lecture 2 coal sping12Lecture 2 coal sping12
Lecture 2 coal sping12Rabia Khalid
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.pptJaya Chavan
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPSPrasenjit Dey
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsAsuka Nakajima
 
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...Hsien-Hsin Sean Lee, Ph.D.
 
Best C++ Programming Homework Help
Best C++ Programming Homework HelpBest C++ Programming Homework Help
Best C++ Programming Homework HelpC++ Homework Help
 
Chapter Eight(2)
Chapter Eight(2)Chapter Eight(2)
Chapter Eight(2)bolovv
 
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Igalia
 
Introduction to c
Introduction to cIntroduction to c
Introduction to camol_chavan
 
Lect05 Prog Model
Lect05 Prog ModelLect05 Prog Model
Lect05 Prog Modelanoosdomain
 
5asm the stackandsubroutines
5asm the stackandsubroutines5asm the stackandsubroutines
5asm the stackandsubroutinesRabi Iftikhar
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.pptssuserd64918
 

Similar to Chapter 2 Part2 C (20)

ISA.pptx
ISA.pptxISA.pptx
ISA.pptx
 
MIPS_Programming.pdf
MIPS_Programming.pdfMIPS_Programming.pdf
MIPS_Programming.pdf
 
Getting Started with Raspberry Pi - DCC 2013.1
Getting Started with Raspberry Pi - DCC 2013.1Getting Started with Raspberry Pi - DCC 2013.1
Getting Started with Raspberry Pi - DCC 2013.1
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
 
Lecture 2 coal sping12
Lecture 2 coal sping12Lecture 2 coal sping12
Lecture 2 coal sping12
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.ppt
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPS
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
 
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
 
Operating System Engineering
Operating System EngineeringOperating System Engineering
Operating System Engineering
 
Best C++ Programming Homework Help
Best C++ Programming Homework HelpBest C++ Programming Homework Help
Best C++ Programming Homework Help
 
Qe Reference
Qe ReferenceQe Reference
Qe Reference
 
Chapter Eight(2)
Chapter Eight(2)Chapter Eight(2)
Chapter Eight(2)
 
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
 
Data race
Data raceData race
Data race
 
Introduction to c
Introduction to cIntroduction to c
Introduction to c
 
Interm codegen
Interm codegenInterm codegen
Interm codegen
 
Lect05 Prog Model
Lect05 Prog ModelLect05 Prog Model
Lect05 Prog Model
 
5asm the stackandsubroutines
5asm the stackandsubroutines5asm the stackandsubroutines
5asm the stackandsubroutines
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
 

More from ececourse

More from ececourse (7)

Chapter 5 c
Chapter 5 cChapter 5 c
Chapter 5 c
 
Chapter 5 b
Chapter 5  bChapter 5  b
Chapter 5 b
 
Auxiliary
AuxiliaryAuxiliary
Auxiliary
 
Mem Tb
Mem TbMem Tb
Mem Tb
 
Machine Problem 2
Machine Problem 2Machine Problem 2
Machine Problem 2
 
Machine Problem 1
Machine Problem 1Machine Problem 1
Machine Problem 1
 
Chapter1
Chapter1Chapter1
Chapter1
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Chapter 2 Part2 C

  • 1. Chapter 2 Instructions: Language of the Computer
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Lazy Linkage Chapter 2 — Instructions: Language of the Computer — Indirection table Stub: Loads routine ID, Jump to linker/loader Linker/loader code Dynamically mapped code
  • 7. Starting Java Applications Chapter 2 — Instructions: Language of the Computer — Simple portable instruction set for the JVM Interprets bytecodes Compiles bytecodes of “hot” methods into native code for host machine
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Effect of Compiler Optimization Chapter 2 — Instructions: Language of the Computer — Compiled with gcc for Pentium 4 under Linux
  • 14. Effect of Language and Algorithm Chapter 2 — Instructions: Language of the Computer —
  • 15.
  • 16.
  • 17. Example: Clearing and Array Chapter 2 — Instructions: Language of the Computer — clear1(int array[], int size) { int i; for (i = 0; i < size; i += 1) array[i] = 0; } clear2(int *array, int size) { int *p; for (p = &array[0]; p < &array[size]; p = p + 1) *p = 0; } move $t0,$zero # i = 0 loop1: sll $t1,$t0,2 # $t1 = i * 4 add $t2,$a0,$t1 # $t2 = # &array[i] sw $zero, 0($t2) # array[i] = 0 addi $t0,$t0,1 # i = i + 1 slt $t3,$t0,$a1 # $t3 = # (i < size) bne $t3,$zero,loop1 # if (…) # goto loop1 move $t0, $a0 # p = & array[0] sll $t1, $a1 ,2 # $t1 = size * 4 add $t2,$a0,$t1 # $t2 = # &array[ size ] loop2: sw $zero,0( $t0 ) # Memory[p] = 0 addi $t0,$t0, 4 # p = p + 4 slt $t3,$t0, $t2 # $t3 = #( p<&array[size] ) bne $t3,$zero,loop2 # if (…) # goto loop2
  • 18.
  • 19.
  • 20.
  • 21. Instruction Encoding Chapter 2 — Instructions: Language of the Computer —
  • 22.
  • 23.
  • 24.
  • 25. Basic x86 Registers Chapter 2 — Instructions: Language of the Computer —
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.

Editor's Notes

  1. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  2. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  3. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  4. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  5. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  6. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  7. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  8. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  9. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  10. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  11. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  12. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  13. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  14. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  15. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  16. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  17. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  18. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  19. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  20. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  21. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  22. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  23. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  24. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  25. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  26. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  27. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  28. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  29. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  30. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  31. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  32. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer
  33. The University of Adelaide, School of Computer Science February 23, 2010 Chapter 2 — Instructions: Language of the Computer