SlideShare a Scribd company logo
1 of 52
Procedures and the Stack Chapter 5 S. Dandamudi
Outline ,[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],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
What is a Stack? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
What is a Stack? (cont’d) ,[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
What is a Stack? (cont’d) ,[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Implementation of the Stack ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Stack Instructions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Stack Example - 1 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Stack Instructions: Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Stack Example - 2 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Additional Pentium Stack Instructions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Additional Pentium Stack Instructions (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Uses of the Stack ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Uses of the Stack (cont’d) ,[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],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Uses of the Stack (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Procedures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Instructions for Procedures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Instructions for Procedures (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pentium Instructions for Procedures (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
How Is Program Control Transferred? ,[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],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Parameter Passing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Parameter Passing: Register Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Pros and Cons of the Register Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Parameter Passing: Stack Method ,[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Accessing Parameters on the Stack ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Using BP Register to Access Parameters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Clearing the Stack Parameters 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page  Stack state after saving EBP Stack state after  pop  EBP Stack state after executing  ret
Clearing the Stack Parameters (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Housekeeping Issues ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Housekeeping Issues (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Housekeeping Issues (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Housekeeping Issues (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Housekeeping Issues (cont’d) 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page  Stack state after  pusha
Stack Frame Instructions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Stack Frame Instructions (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
A Typical Procedure Template ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Stack Parameter Passing: Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Variable Number of Parameters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Variable Number of Parameters (cont’d) ,[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Memory Layout of a Linux Process 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Local Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Local Variables (cont’d) ,[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Local Variables (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Local Variables: Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Multiple Module Programs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
GLOBAL Assembler Directive ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Example: GLOBAL Assembler Directive ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
EXTRN Assembler Directive ,[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
EXTERN Assembler Directive (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Performance: Procedure Overheads ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page
Performance: Procedure Overheads (cont’d) 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page  With sort procedure Without sort procedure
Performance: Local Variable Overhead 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005. ,[object Object],Chapter 5: Page  Local variables in stack Local variables in registers Last slide

More Related Content

What's hot

Fortran - concise review
Fortran - concise reviewFortran - concise review
Fortran - concise reviewHans Zimermann
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1Motaz Saad
 
Unit 4 assembly language programming
Unit 4   assembly language programmingUnit 4   assembly language programming
Unit 4 assembly language programmingKartik Sharma
 
Programming languages
Programming languagesProgramming languages
Programming languagesEelco Visser
 
1344 Alp Of 8086
1344 Alp Of 80861344 Alp Of 8086
1344 Alp Of 8086techbed
 
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...Hsien-Hsin Sean Lee, Ph.D.
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Bilal Amjad
 
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...Hsien-Hsin Sean Lee, Ph.D.
 
Code GPU with CUDA - Memory Subsystem
Code GPU with CUDA - Memory SubsystemCode GPU with CUDA - Memory Subsystem
Code GPU with CUDA - Memory SubsystemMarina Kolpakova
 
Unit 2 assembly language programming
Unit 2   assembly language programmingUnit 2   assembly language programming
Unit 2 assembly language programmingKartik Sharma
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly LanguageAhmed M. Abed
 
System Programming Unit IV
System Programming Unit IVSystem Programming Unit IV
System Programming Unit IVManoj Patil
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5Motaz Saad
 
Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?Eelco Visser
 
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWLec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWHsien-Hsin Sean Lee, Ph.D.
 

What's hot (20)

Fortran - concise review
Fortran - concise reviewFortran - concise review
Fortran - concise review
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
Unit 4 assembly language programming
Unit 4   assembly language programmingUnit 4   assembly language programming
Unit 4 assembly language programming
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
1344 Alp Of 8086
1344 Alp Of 80861344 Alp Of 8086
1344 Alp Of 8086
 
Lecture5(1)
Lecture5(1)Lecture5(1)
Lecture5(1)
 
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
 
Seminar Fortran and Julia
Seminar Fortran and JuliaSeminar Fortran and Julia
Seminar Fortran and Julia
 
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
 
Code GPU with CUDA - Memory Subsystem
Code GPU with CUDA - Memory SubsystemCode GPU with CUDA - Memory Subsystem
Code GPU with CUDA - Memory Subsystem
 
Unit 2 assembly language programming
Unit 2   assembly language programmingUnit 2   assembly language programming
Unit 2 assembly language programming
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
System Programming Unit IV
System Programming Unit IVSystem Programming Unit IV
System Programming Unit IV
 
Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
 
Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?
 
Intr fortran90
Intr fortran90Intr fortran90
Intr fortran90
 
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWLec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
 
Lecture6
Lecture6Lecture6
Lecture6
 

Viewers also liked

Macros in system programing
Macros in system programingMacros in system programing
Macros in system programingBrijesh__patel
 
Macro features Film Studies
Macro features Film StudiesMacro features Film Studies
Macro features Film StudiesBen Atherton
 
Programmable Macro Language (Basic)
Programmable Macro Language (Basic)Programmable Macro Language (Basic)
Programmable Macro Language (Basic)Hadi Karimi
 
Assembler design option
Assembler design optionAssembler design option
Assembler design optionMohd Arif
 
Assembler design options
Assembler design optionsAssembler design options
Assembler design optionsMohd Arif
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085Nitin Ahire
 
Fundamentals of Language Processing
Fundamentals of Language ProcessingFundamentals of Language Processing
Fundamentals of Language ProcessingHemant Sharma
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programmingMukesh Tekwani
 
System Programming Unit III
System Programming Unit IIISystem Programming Unit III
System Programming Unit IIIManoj Patil
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareProf. Swapnil V. Kaware
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit IIManoj Patil
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1techbed
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer FundamentalsSaumya Sahu
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORGurudev joshi
 
8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture pptParvesh Gautam
 

Viewers also liked (19)

Coal 21- macro in Assembly Programming
Coal 21- macro in Assembly ProgrammingCoal 21- macro in Assembly Programming
Coal 21- macro in Assembly Programming
 
Macros in system programing
Macros in system programingMacros in system programing
Macros in system programing
 
Macro features Film Studies
Macro features Film StudiesMacro features Film Studies
Macro features Film Studies
 
Programmable Macro Language (Basic)
Programmable Macro Language (Basic)Programmable Macro Language (Basic)
Programmable Macro Language (Basic)
 
Assembler design option
Assembler design optionAssembler design option
Assembler design option
 
Assembler design options
Assembler design optionsAssembler design options
Assembler design options
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085
 
Fundamentals of Language Processing
Fundamentals of Language ProcessingFundamentals of Language Processing
Fundamentals of Language Processing
 
System programming
System programmingSystem programming
System programming
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 
System Programming Unit III
System Programming Unit IIISystem Programming Unit III
System Programming Unit III
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit II
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
 
System Programming Overview
System Programming OverviewSystem Programming Overview
System Programming Overview
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSOR
 
8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture ppt
 

Similar to Al2ed chapter5

Introduction to c
Introduction to cIntroduction to c
Introduction to camol_chavan
 
Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Hermann Hueck
 
Cs6660 compiler design may june 2016 Answer Key
Cs6660 compiler design may june 2016 Answer KeyCs6660 compiler design may june 2016 Answer Key
Cs6660 compiler design may june 2016 Answer Keyappasami
 
Chapter 2 Part2 C
Chapter 2 Part2 CChapter 2 Part2 C
Chapter 2 Part2 Cececourse
 
Parallel Programming on the ANDC cluster
Parallel Programming on the ANDC clusterParallel Programming on the ANDC cluster
Parallel Programming on the ANDC clusterSudhang Shankar
 
Lect05 Prog Model
Lect05 Prog ModelLect05 Prog Model
Lect05 Prog Modelanoosdomain
 
Report on c and c++
Report on c and c++Report on c and c++
Report on c and c++oggyrao
 
Chapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdfChapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdfRAnwarpasha
 
Aspect-oriented programming in Perl
Aspect-oriented programming in PerlAspect-oriented programming in Perl
Aspect-oriented programming in Perlmegakott
 
Chapter 2 Part1
Chapter 2 Part1Chapter 2 Part1
Chapter 2 Part1ececourse
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersAlessandro Sanino
 
A Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKEA Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKEDaniel Wachtel
 
PLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal GeneratorPLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal GeneratorEmmanuel Fuchs
 
C programming session 01
C programming session 01C programming session 01
C programming session 01Dushmanta Nath
 

Similar to Al2ed chapter5 (20)

Introduction to c
Introduction to cIntroduction to c
Introduction to c
 
parallel-computation.pdf
parallel-computation.pdfparallel-computation.pdf
parallel-computation.pdf
 
Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)
 
Cs6660 compiler design may june 2016 Answer Key
Cs6660 compiler design may june 2016 Answer KeyCs6660 compiler design may june 2016 Answer Key
Cs6660 compiler design may june 2016 Answer Key
 
Syntutic
SyntuticSyntutic
Syntutic
 
Chapter 2 Part2 C
Chapter 2 Part2 CChapter 2 Part2 C
Chapter 2 Part2 C
 
Parallel Programming on the ANDC cluster
Parallel Programming on the ANDC clusterParallel Programming on the ANDC cluster
Parallel Programming on the ANDC cluster
 
Lect05 Prog Model
Lect05 Prog ModelLect05 Prog Model
Lect05 Prog Model
 
Report on c and c++
Report on c and c++Report on c and c++
Report on c and c++
 
Chapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdfChapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdf
 
Aspect-oriented programming in Perl
Aspect-oriented programming in PerlAspect-oriented programming in Perl
Aspect-oriented programming in Perl
 
Chapter 2 Part1
Chapter 2 Part1Chapter 2 Part1
Chapter 2 Part1
 
ISA.pptx
ISA.pptxISA.pptx
ISA.pptx
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to Gophers
 
A Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKEA Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKE
 
Parallel computation
Parallel computationParallel computation
Parallel computation
 
PLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal GeneratorPLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal Generator
 
Mp lab manual
Mp lab manualMp lab manual
Mp lab manual
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
Spr ch-02
Spr ch-02Spr ch-02
Spr ch-02
 

More from Abdullelah Al-Fahad (17)

Al2ed chapter17
Al2ed chapter17Al2ed chapter17
Al2ed chapter17
 
Al2ed chapter16
Al2ed chapter16Al2ed chapter16
Al2ed chapter16
 
Al2ed chapter15
Al2ed chapter15Al2ed chapter15
Al2ed chapter15
 
Al2ed chapter14
Al2ed chapter14Al2ed chapter14
Al2ed chapter14
 
Al2ed chapter13
Al2ed chapter13Al2ed chapter13
Al2ed chapter13
 
Al2ed chapter12
Al2ed chapter12Al2ed chapter12
Al2ed chapter12
 
Al2ed chapter11
Al2ed chapter11Al2ed chapter11
Al2ed chapter11
 
Al2ed chapter10
Al2ed chapter10Al2ed chapter10
Al2ed chapter10
 
Al2ed chapter9
Al2ed chapter9Al2ed chapter9
Al2ed chapter9
 
Al2ed chapter8
Al2ed chapter8Al2ed chapter8
Al2ed chapter8
 
Al2ed chapter7
Al2ed chapter7Al2ed chapter7
Al2ed chapter7
 
Al2ed chapter6
Al2ed chapter6Al2ed chapter6
Al2ed chapter6
 
Al2ed chapter4
Al2ed chapter4Al2ed chapter4
Al2ed chapter4
 
Al2ed chapter3
Al2ed chapter3Al2ed chapter3
Al2ed chapter3
 
Al2ed chapter2
Al2ed chapter2Al2ed chapter2
Al2ed chapter2
 
Al2ed chapter1
Al2ed chapter1Al2ed chapter1
Al2ed chapter1
 
Al2ed chapter18
Al2ed chapter18Al2ed chapter18
Al2ed chapter18
 

Al2ed chapter5

  • 1. Procedures and the Stack Chapter 5 S. Dandamudi
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.