SlideShare a Scribd company logo
1 of 10
PROCEDURE CALLS
BP150523
Nithya.S
II-Msc(computer science)
Sacred Heart college(Tirupattur)
CONTENTS
 Procedure Calls
 Calling Sequence
 Simple Example
PROCEDURE CALLS
 Important frequency used programming construct.
Generate good code for procedural call and return
run-time routines.
 Programmatic subroutine(function,procedure, or
subprogram) or sequence of code wich performs a
specific task as part of a larger program that is
grouped as one or more statement blocks with the
typical intention of doing one thing well.
 Run-time routines it is handle Procedure argument
passing, Calls, and Returns are part of the run-time
support package
 Grammar for simple procedure call statement
 Scall id(Elist)
ElistElist,E
ElistE
CALLING SEQUENCE
 Calling sequence is differ, even for implementation
for same language.
 Is the code sequence required to effect transfer of
control to a subroutine or procedure, include
parameter passing and recording of the return
address.
 It is required to call procedures written in a different
language from the calling program.
 The difference in procedure calls
i. Source Language.
ii. Target Machine.
iii. Operating System
EXAMPLE
 Scall id (Elist)
{ for each item p on queue do
emit(‘param’ p)
emit(‘call’ id.place)
}
ElistElist,E
{
Append E.place to the end of queue
}
 ElistE
{
initialize queue to contain only E.place
}
Scall id(Elist) will generate a param statement for
each item on queue,causing these statements to
follow the statement evaluating the argument
expression.
 Those statements were generated when the
arguments themseives were reduced to E.
 The code for S is the code for Elist, which evaluates
the arguments, followed by a param p statement for
each argument.
 Followed by a call statement. A count of the number
of parameters is not generated with the call
statement but could but calculated in the same way
we computed Elist.ndim in the previous section.
THANK YOU

More Related Content

What's hot (20)

phases of compiler-analysis phase
phases of compiler-analysis phasephases of compiler-analysis phase
phases of compiler-analysis phase
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
Spr ch-05-compilers
Spr ch-05-compilersSpr ch-05-compilers
Spr ch-05-compilers
 
Techniques & applications of Compiler
Techniques & applications of CompilerTechniques & applications of Compiler
Techniques & applications of Compiler
 
Phases of-compiler
Phases of-compilerPhases of-compiler
Phases of-compiler
 
Compiler lecture 03
Compiler lecture 03Compiler lecture 03
Compiler lecture 03
 
Compiler1
Compiler1Compiler1
Compiler1
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Concept of compiler in details
Concept of compiler in detailsConcept of compiler in details
Concept of compiler in details
 
Lecture2 general structure of a compiler
Lecture2 general structure of a compilerLecture2 general structure of a compiler
Lecture2 general structure of a compiler
 
Compiler design
Compiler designCompiler design
Compiler design
 
Compilers
CompilersCompilers
Compilers
 
Compilers
CompilersCompilers
Compilers
 
Classification of Compilers
Classification of CompilersClassification of Compilers
Classification of Compilers
 
Basic of compiler
Basic of compiler Basic of compiler
Basic of compiler
 
Assembler
AssemblerAssembler
Assembler
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
Compiler presentaion
Compiler presentaionCompiler presentaion
Compiler presentaion
 
Introduction to Compiler
Introduction to CompilerIntroduction to Compiler
Introduction to Compiler
 

Viewers also liked

Viewers also liked (20)

Case statements
Case statementsCase statements
Case statements
 
Assignment statements
Assignment statementsAssignment statements
Assignment statements
 
Declarations
DeclarationsDeclarations
Declarations
 
Code optimization
Code optimization Code optimization
Code optimization
 
ASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS ANDASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS AND
 
Unit iv(simple code generator)
Unit iv(simple code generator)Unit iv(simple code generator)
Unit iv(simple code generator)
 
Graph coloring algorithm
Graph coloring algorithmGraph coloring algorithm
Graph coloring algorithm
 
Critical Thinking Advantages And Disadvantages Krizia GóMez
Critical Thinking Advantages And Disadvantages Krizia GóMezCritical Thinking Advantages And Disadvantages Krizia GóMez
Critical Thinking Advantages And Disadvantages Krizia GóMez
 
Graph coloring Algorithm
Graph coloring AlgorithmGraph coloring Algorithm
Graph coloring Algorithm
 
Chromatic graph theory
Chromatic graph theoryChromatic graph theory
Chromatic graph theory
 
3 Total Internal Reflection
3 Total Internal Reflection3 Total Internal Reflection
3 Total Internal Reflection
 
code optimization
code optimization code optimization
code optimization
 
Lecture 11 semantic analysis 2
Lecture 11 semantic analysis 2Lecture 11 semantic analysis 2
Lecture 11 semantic analysis 2
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler design
 
Three address code In Compiler Design
Three address code In Compiler DesignThree address code In Compiler Design
Three address code In Compiler Design
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
 
Code generation
Code generationCode generation
Code generation
 
Pharmacy management system Requirement Analysis and Elicitation Document
Pharmacy management system Requirement Analysis and Elicitation Document Pharmacy management system Requirement Analysis and Elicitation Document
Pharmacy management system Requirement Analysis and Elicitation Document
 
Digitemb
DigitembDigitemb
Digitemb
 
Norton Bevel System - Brochure
Norton Bevel System - BrochureNorton Bevel System - Brochure
Norton Bevel System - Brochure
 

Similar to Procedure calls(compilar)

Chapter Seven(1)
Chapter Seven(1)Chapter Seven(1)
Chapter Seven(1)bolovv
 
Dc 12 Chiueh
Dc 12 ChiuehDc 12 Chiueh
Dc 12 Chiuehwollard
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docxshruti533256
 
As novidades do C# 5.0
As novidades do C# 5.0As novidades do C# 5.0
As novidades do C# 5.0pt_programar
 
What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013Paulo Morgado
 
Parallel language & compilers
Parallel language & compilersParallel language & compilers
Parallel language & compilersdikshagupta111
 
SystemVerilog_veriflcation and UVM for IC design.ppt
SystemVerilog_veriflcation and UVM for IC design.pptSystemVerilog_veriflcation and UVM for IC design.ppt
SystemVerilog_veriflcation and UVM for IC design.pptntareq91
 
Introduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingIntroduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingRahul P
 
What's new in c# 5.0 net ponto
What's new in c# 5.0   net pontoWhat's new in c# 5.0   net ponto
What's new in c# 5.0 net pontoPaulo Morgado
 
002 Operating-System Structures.ppt
002 Operating-System Structures.ppt002 Operating-System Structures.ppt
002 Operating-System Structures.pptAxmedMaxamuudYoonis
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESpriyasoundar
 
Intermediate code optimization Unit-4.pdf
Intermediate code optimization Unit-4.pdfIntermediate code optimization Unit-4.pdf
Intermediate code optimization Unit-4.pdfHimanshu883663
 
Software development slides
Software development slidesSoftware development slides
Software development slidesiarthur
 
Embedded Solutions 2010 : Challenges In Porting and Abstraction , by Mapusoft
Embedded Solutions 2010 : Challenges In Porting  and Abstraction , by Mapusoft Embedded Solutions 2010 : Challenges In Porting  and Abstraction , by Mapusoft
Embedded Solutions 2010 : Challenges In Porting and Abstraction , by Mapusoft New-Tech Magazine
 
A Crash Course in C Part-1
A Crash Course in C Part-1A Crash Course in C Part-1
A Crash Course in C Part-1MD SAMIR UDDIN
 
System verilog important
System verilog importantSystem verilog important
System verilog importantelumalai7
 
SDD Translation
SDD  TranslationSDD  Translation
SDD Translationgavhays
 
parallel language and compiler
parallel language and compilerparallel language and compiler
parallel language and compilerVignesh Tamil
 

Similar to Procedure calls(compilar) (20)

Procedure
ProcedureProcedure
Procedure
 
Chapter Seven(1)
Chapter Seven(1)Chapter Seven(1)
Chapter Seven(1)
 
Dc 12 Chiueh
Dc 12 ChiuehDc 12 Chiueh
Dc 12 Chiueh
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docx
 
As novidades do C# 5.0
As novidades do C# 5.0As novidades do C# 5.0
As novidades do C# 5.0
 
What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013
 
Parallel language & compilers
Parallel language & compilersParallel language & compilers
Parallel language & compilers
 
SystemVerilog_veriflcation and UVM for IC design.ppt
SystemVerilog_veriflcation and UVM for IC design.pptSystemVerilog_veriflcation and UVM for IC design.ppt
SystemVerilog_veriflcation and UVM for IC design.ppt
 
Introduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingIntroduction to Assembly Language Programming
Introduction to Assembly Language Programming
 
What's new in c# 5.0 net ponto
What's new in c# 5.0   net pontoWhat's new in c# 5.0   net ponto
What's new in c# 5.0 net ponto
 
002 Operating-System Structures.ppt
002 Operating-System Structures.ppt002 Operating-System Structures.ppt
002 Operating-System Structures.ppt
 
Porcorn tutorial
Porcorn tutorialPorcorn tutorial
Porcorn tutorial
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
 
Intermediate code optimization Unit-4.pdf
Intermediate code optimization Unit-4.pdfIntermediate code optimization Unit-4.pdf
Intermediate code optimization Unit-4.pdf
 
Software development slides
Software development slidesSoftware development slides
Software development slides
 
Embedded Solutions 2010 : Challenges In Porting and Abstraction , by Mapusoft
Embedded Solutions 2010 : Challenges In Porting  and Abstraction , by Mapusoft Embedded Solutions 2010 : Challenges In Porting  and Abstraction , by Mapusoft
Embedded Solutions 2010 : Challenges In Porting and Abstraction , by Mapusoft
 
A Crash Course in C Part-1
A Crash Course in C Part-1A Crash Course in C Part-1
A Crash Course in C Part-1
 
System verilog important
System verilog importantSystem verilog important
System verilog important
 
SDD Translation
SDD  TranslationSDD  Translation
SDD Translation
 
parallel language and compiler
parallel language and compilerparallel language and compiler
parallel language and compiler
 

Recently uploaded

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 

Recently uploaded (20)

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

Procedure calls(compilar)

  • 2. CONTENTS  Procedure Calls  Calling Sequence  Simple Example
  • 3. PROCEDURE CALLS  Important frequency used programming construct. Generate good code for procedural call and return run-time routines.  Programmatic subroutine(function,procedure, or subprogram) or sequence of code wich performs a specific task as part of a larger program that is grouped as one or more statement blocks with the typical intention of doing one thing well.
  • 4.  Run-time routines it is handle Procedure argument passing, Calls, and Returns are part of the run-time support package  Grammar for simple procedure call statement  Scall id(Elist) ElistElist,E ElistE
  • 5. CALLING SEQUENCE  Calling sequence is differ, even for implementation for same language.  Is the code sequence required to effect transfer of control to a subroutine or procedure, include parameter passing and recording of the return address.
  • 6.  It is required to call procedures written in a different language from the calling program.  The difference in procedure calls i. Source Language. ii. Target Machine. iii. Operating System
  • 7. EXAMPLE  Scall id (Elist) { for each item p on queue do emit(‘param’ p) emit(‘call’ id.place) } ElistElist,E { Append E.place to the end of queue }
  • 8.  ElistE { initialize queue to contain only E.place } Scall id(Elist) will generate a param statement for each item on queue,causing these statements to follow the statement evaluating the argument expression.
  • 9.  Those statements were generated when the arguments themseives were reduced to E.  The code for S is the code for Elist, which evaluates the arguments, followed by a param p statement for each argument.  Followed by a call statement. A count of the number of parameters is not generated with the call statement but could but calculated in the same way we computed Elist.ndim in the previous section.