SlideShare a Scribd company logo
1 of 17
..
Computer Organization ALA
Semester 4
CSE A
Topic: PROGRAM CONTROL
Introduction to the contentIntroduction to the content
Instructions are always stored in successive memory
locations.
Each time an instruction is fetched from memory, the
program counter is incremented so that it contains the
address of the next instruction in sequence.
Specifically, program control instruction when executed may
change the address value in program counter and cause the
flow of control to be altered.
Topics in Program ControlTopics in Program Control
•Status bit conditions
•Conditional Branch Instructions
•Subroutine Call and Return
•Program interrupt & types
status bit conditionsstatus bit conditions
The status register is a hardware register that contains
information about the state of the processor..
The status register lets an instruction take action
contingent on the outcome of a previous instruction.
The status register in a traditional processor design
includes at least three central flags: Zero, Carry, and
Overflow, which are set or cleared automatically as effects
of arithmetic and bit manipulation operations.
What are conditional branch instructions?What are conditional branch instructions?
The term branching can be used when referring
to programs in high level languages as well as
program written in machine code or assembly
language.
In high-level programming languages, branches
usually take the form of conditional statements of
various forms that encapsulate the instruction
sequence that will be executed if the conditions
are satisfied..
Machine level branch instructions are sometimes
called jump instructions.
Subroutine CallSubroutine Call
•A subroutine is a self-contained sequence of
instructions that perform a given computational
task.
During the execution of a program , a subroutine
may be called to perform its function many times
at various points.
Subroutine ReturnSubroutine Return
The subroutine may return a computed
value to its caller (its return value), or
provide various result values or output
parameters.
A subroutine call may also have side
effects such as modifying data structures in
a computer memory, reading from or
writing to a peripheral device, creating a
file, halting the program or the machine, or
even delaying the program's execution for
a specified timeout
Program InterruptProgram Interrupt
When a Process is executed by the CPU and
when a user Request for another Process then
this will create disturbance for the Running
Process.This is also called as the Interrupt.
Interrupts can be generated by User, Some Error
Conditions and also by Software’s and the
hardware’s. So that When an interrupt has
Occurred then the CPU will handle by using the
Fetch, decode and Execute Operations.
Interrupts allow the operating system to take
notice of an external event, such as a mouse click.
Supervisor ModeSupervisor Mode
The execution mode on some processors which
enables execution of all instructions, including
privileged instructions.
It may also give access to a different address
space, to memory management hardware and to
other peripherals.
This is the mode in which the operating system
usually runs.
In computer terms, supervisor mode is a
hardware-mediated flag which can be changed by
code running in system-level software.
Types of program interruptTypes of program interrupt
External
Internal
Software
External InterruptsExternal Interrupts
They come from I/O devices, from a timing
device, from a circuit monitoring the power
supply, or from any other external source.
Timeout interrupt may result from a program
that is an endless loop and thus exceeded its time
allocation.
Internal InterruptsInternal Interrupts
They arise from illegal use of an instruction or
date.They are also called TRAPS.
These erros occur due as a result of premature
termination of the instruction execution.
The service program that processes the internal
interrupt determines the corrective measure to
be taken.
Software interruptsSoftware interrupts
It is a special instruction that behaves like an
interrupt rather than a subroutine call.
It can be used by the programmer to initiate an
interrupt procedure at any desired point in the
program.
It is mainly used in supervisor mode.
THANKYOUTHANKYOU

More Related Content

What's hot

Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
 
Modes of data transfer.computer architecture.
Modes of data transfer.computer architecture. Modes of data transfer.computer architecture.
Modes of data transfer.computer architecture. pratikkadam78
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Computer instructions
Computer instructionsComputer instructions
Computer instructionsAnuj Modi
 
Input output organization
Input output organizationInput output organization
Input output organizationabdulugc
 
Asynchronous data transfer
Asynchronous data transferAsynchronous data transfer
Asynchronous data transferpriya Nithya
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and ArchitectureVinit Raut
 

What's hot (20)

Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
Modes of data transfer.computer architecture.
Modes of data transfer.computer architecture. Modes of data transfer.computer architecture.
Modes of data transfer.computer architecture.
 
Basic Computer Organization and Design
Basic  Computer  Organization  and  DesignBasic  Computer  Organization  and  Design
Basic Computer Organization and Design
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Interrupts and types of interrupts
Interrupts and types of interruptsInterrupts and types of interrupts
Interrupts and types of interrupts
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
pipelining
pipeliningpipelining
pipelining
 
Interrupts
InterruptsInterrupts
Interrupts
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Micro program example
Micro program exampleMicro program example
Micro program example
 
Asynchronous data transfer
Asynchronous data transferAsynchronous data transfer
Asynchronous data transfer
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 

Viewers also liked

Computer Control Your Presentation
Computer Control Your PresentationComputer Control Your Presentation
Computer Control Your PresentationAndrew Duckworth
 
Cs160 chapter 2
Cs160 chapter 2Cs160 chapter 2
Cs160 chapter 2Joe Paris
 
The Basic Organization of Computers
The Basic Organization of ComputersThe Basic Organization of Computers
The Basic Organization of ComputersTallat Satti
 
Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500Lino Hugun Saputra
 
Data transfer system
Data transfer systemData transfer system
Data transfer systemSajan Sahu
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithmsBhatt Aadil
 
Reduced instruction set computers
Reduced instruction set computersReduced instruction set computers
Reduced instruction set computersSanjivani Sontakke
 
Data transfer scheme
Data transfer schemeData transfer scheme
Data transfer schemerockymani
 
Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layersambhenilesh
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferAnuj Modi
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmfarimoin
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 

Viewers also liked (17)

CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
 
Computer Control Your Presentation
Computer Control Your PresentationComputer Control Your Presentation
Computer Control Your Presentation
 
Text tweens
Text tweensText tweens
Text tweens
 
Cs160 chapter 2
Cs160 chapter 2Cs160 chapter 2
Cs160 chapter 2
 
The Basic Organization of Computers
The Basic Organization of ComputersThe Basic Organization of Computers
The Basic Organization of Computers
 
Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500
 
Data transfer system
Data transfer systemData transfer system
Data transfer system
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithms
 
Risc
RiscRisc
Risc
 
Reduced instruction set computers
Reduced instruction set computersReduced instruction set computers
Reduced instruction set computers
 
Data transfer scheme
Data transfer schemeData transfer scheme
Data transfer scheme
 
Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layer
 
Data transferschemes
Data transferschemesData transferschemes
Data transferschemes
 
Various type of register
Various type of registerVarious type of register
Various type of register
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transfer
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 

Similar to Program Control: Introduction to Conditional Branching, Subroutines, and Interrupts

Operating System
Operating SystemOperating System
Operating Systemguest8b0942
 
CS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptxCS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptxAsst.prof M.Gokilavani
 
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnectionnoman yasin
 
Operating system
Operating systemOperating system
Operating systemMark Muhama
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfTaufeeq8
 
Functions of the Operating System
Functions of the Operating SystemFunctions of the Operating System
Functions of the Operating Systemandyr91
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and ArchitectureDhaval Bagal
 
Binary obfuscation using signals
Binary obfuscation using signalsBinary obfuscation using signals
Binary obfuscation using signalsUltraUploader
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: ProcessAnkonGopalBanik
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2Gaurav Meena
 

Similar to Program Control: Introduction to Conditional Branching, Subroutines, and Interrupts (20)

Lect15 organization
Lect15 organizationLect15 organization
Lect15 organization
 
Operating System
Operating SystemOperating System
Operating System
 
Spr ch-01
Spr ch-01Spr ch-01
Spr ch-01
 
CS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptxCS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptx
 
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
 
Operating system
Operating systemOperating system
Operating system
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
 
Ss debuggers
Ss debuggersSs debuggers
Ss debuggers
 
Functions of the Operating System
Functions of the Operating SystemFunctions of the Operating System
Functions of the Operating System
 
Matter new
Matter newMatter new
Matter new
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Binary obfuscation using signals
Binary obfuscation using signalsBinary obfuscation using signals
Binary obfuscation using signals
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: Process
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 2
Unit 2Unit 2
Unit 2
 
Running a Program.pdf
Running a Program.pdfRunning a Program.pdf
Running a Program.pdf
 
Clifford sugerman
Clifford sugermanClifford sugerman
Clifford sugerman
 
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptx
 

More from Rahul Narang

Disk scheduling algo os
Disk scheduling algo osDisk scheduling algo os
Disk scheduling algo osRahul Narang
 
System of linear algebriac equations nsm
System of linear algebriac equations nsmSystem of linear algebriac equations nsm
System of linear algebriac equations nsmRahul Narang
 
Greeenhouse effects
Greeenhouse effectsGreeenhouse effects
Greeenhouse effectsRahul Narang
 
Embarking the journey to contributorship
Embarking the journey to contributorshipEmbarking the journey to contributorship
Embarking the journey to contributorshipRahul Narang
 
Laplace transforms
Laplace transformsLaplace transforms
Laplace transformsRahul Narang
 

More from Rahul Narang (8)

Turing Machine
Turing MachineTuring Machine
Turing Machine
 
OpAmps
OpAmpsOpAmps
OpAmps
 
Disk scheduling algo os
Disk scheduling algo osDisk scheduling algo os
Disk scheduling algo os
 
System of linear algebriac equations nsm
System of linear algebriac equations nsmSystem of linear algebriac equations nsm
System of linear algebriac equations nsm
 
Greeenhouse effects
Greeenhouse effectsGreeenhouse effects
Greeenhouse effects
 
Embarking the journey to contributorship
Embarking the journey to contributorshipEmbarking the journey to contributorship
Embarking the journey to contributorship
 
Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
 
View of data DBMS
View of data DBMSView of data DBMS
View of data DBMS
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 

Program Control: Introduction to Conditional Branching, Subroutines, and Interrupts

  • 1. .. Computer Organization ALA Semester 4 CSE A Topic: PROGRAM CONTROL
  • 2. Introduction to the contentIntroduction to the content Instructions are always stored in successive memory locations. Each time an instruction is fetched from memory, the program counter is incremented so that it contains the address of the next instruction in sequence. Specifically, program control instruction when executed may change the address value in program counter and cause the flow of control to be altered.
  • 3. Topics in Program ControlTopics in Program Control •Status bit conditions •Conditional Branch Instructions •Subroutine Call and Return •Program interrupt & types
  • 4. status bit conditionsstatus bit conditions The status register is a hardware register that contains information about the state of the processor.. The status register lets an instruction take action contingent on the outcome of a previous instruction. The status register in a traditional processor design includes at least three central flags: Zero, Carry, and Overflow, which are set or cleared automatically as effects of arithmetic and bit manipulation operations.
  • 5.
  • 6. What are conditional branch instructions?What are conditional branch instructions? The term branching can be used when referring to programs in high level languages as well as program written in machine code or assembly language. In high-level programming languages, branches usually take the form of conditional statements of various forms that encapsulate the instruction sequence that will be executed if the conditions are satisfied.. Machine level branch instructions are sometimes called jump instructions.
  • 7. Subroutine CallSubroutine Call •A subroutine is a self-contained sequence of instructions that perform a given computational task. During the execution of a program , a subroutine may be called to perform its function many times at various points.
  • 8. Subroutine ReturnSubroutine Return The subroutine may return a computed value to its caller (its return value), or provide various result values or output parameters. A subroutine call may also have side effects such as modifying data structures in a computer memory, reading from or writing to a peripheral device, creating a file, halting the program or the machine, or even delaying the program's execution for a specified timeout
  • 9.
  • 10.
  • 11. Program InterruptProgram Interrupt When a Process is executed by the CPU and when a user Request for another Process then this will create disturbance for the Running Process.This is also called as the Interrupt. Interrupts can be generated by User, Some Error Conditions and also by Software’s and the hardware’s. So that When an interrupt has Occurred then the CPU will handle by using the Fetch, decode and Execute Operations. Interrupts allow the operating system to take notice of an external event, such as a mouse click.
  • 12. Supervisor ModeSupervisor Mode The execution mode on some processors which enables execution of all instructions, including privileged instructions. It may also give access to a different address space, to memory management hardware and to other peripherals. This is the mode in which the operating system usually runs. In computer terms, supervisor mode is a hardware-mediated flag which can be changed by code running in system-level software.
  • 13. Types of program interruptTypes of program interrupt External Internal Software
  • 14. External InterruptsExternal Interrupts They come from I/O devices, from a timing device, from a circuit monitoring the power supply, or from any other external source. Timeout interrupt may result from a program that is an endless loop and thus exceeded its time allocation.
  • 15. Internal InterruptsInternal Interrupts They arise from illegal use of an instruction or date.They are also called TRAPS. These erros occur due as a result of premature termination of the instruction execution. The service program that processes the internal interrupt determines the corrective measure to be taken.
  • 16. Software interruptsSoftware interrupts It is a special instruction that behaves like an interrupt rather than a subroutine call. It can be used by the programmer to initiate an interrupt procedure at any desired point in the program. It is mainly used in supervisor mode.