SlideShare a Scribd company logo
1 of 17
Data Transfer and Manipulation
ARCHANA R,
ASSISTANT PROFESSOR IN DEPARTMENTOF CS
SACWC.
Data Transfer and Manipulation
Most computer instructions can be
classified into three categories:
2)Data transfer,
2)Data manipulation,
3)Program control instructions
Data Transfer Instruction
Data transfer instructions move data from
one place in the computer to another
without changing the data content
The most common transfers are between
memory and processor
registers,between processor registers
and input or output,and between the
processor registers themselves.
NAME Mnemonic
Load LD
Store ST
Move MOV
Exchange
XC
H
Input IN
Output
OU
T
Push PUSH
pop POP
Typical Data Transfer Instruction :
» Load : transfer from memory to a processor register,
usually an AC (memory read)
» Store : transfer from a processor register into memory
(memory write)
» Move : transfer from one register to another register
» Exchange : swap information between two registers or
a register and a memory word
» Input/Output : transfer data among processor
registers and input/output device
» Push/Pop : transfer data between processor
registers and a memory stack
Data Manipulation Instruction
Data Manipulation Instructions perform
operations on data and provide the
computational capabilities for the
computer.
It is divided into three basic types:
1) Arithmetic,
2) Logical and bit manipulation,
3)Shift Instruction
Arithmetic Insructions
NAME
Mnemoni
c
Increment INC
Decrement DEC
Add ADD
Subtract
SU
B
Multiply MUL
Divide
DI
V
Add with carry ADDC
Subtract with
SUB
B
borrow
Negate (2’s NEG
Logical and bit manipulation
Insructions
NAME Mnemonic
Clear CLR
Complement COM
AND AND
OR
O
R
Exclusive-or XOR
Clear carry
CLR
C
Set carry SETC
complement carry
COM
C
Enable interrupt EI
Disable interrupt
D
I
Shift Instructions
NAME
Mnemoni
c Logical shift right
SHR
Logical shift left SHL
Arithmetic shift SHRA
right
Arithmetic shift SHLA
left
Rotate right ROR
Rotate left ROL
Rotate right RORC
through carry
Rotate left ROLC
through carry
Program control
Program control instructions specify conditions for
altering the content of the program counter , while data
transfer and manipulation instructions specify condtions
for data-processing operations.
NAME Mnemonic
Branch BR
Jump JMP
Skip SKP
Call
CAL
L
Return RET
Compare(by subtraction) CMP
Test(by ANDing) TST
Status Bit Conditions
• It is convinentto supplement the ALU
circuit in the CPU with a status register
where status bit condition can be stored
for further analysis.
• Status bits are also called condition code
bit or flag bit.
• The four status bits are symbolized by
C,S,Z and V.
• The bits are set or cleared as a result
of an operation performed in the ALU
4-bit status register
Conditional Branch Instructions
Subroutine Call and Return
It is a self-contained sequence of
instructions that performs a given
computational task.
During the execution of a program,a
subroutine may call when it is called, a
branch is executed to the beginning of the
subroutine to start executing its set of
instructions. After the subroutine has
been executed,a branch is made back to
the main program.
A subroutine call is implemented with
the following microoperations:
CALL:
SP← SP-1: Decrement stack point
M[SP] ←PC : Push content of PC onto
the stack
PC←Effective Address : Transfer control
to the subroutine
RETURN:
PC ← M[SP] : Pop stack and transfer to PC
SP ← SP+1 : Increment stack pointer
Program Interrupt
» Transfer program control from a currently
running program to another service
program
as a result of an external or internal
generated request
» Control returns to the original program
after the service program is executed
Types of Interrupts
1)External Interrupts
» come from I/O device, from a timing device,
from a circuit
monitoring the power supply, or from any other
external source
2)Internal Interrupts or TRAP
» caused by register overflow, attempt to divide by
zero,
an invalid operation code, stack overflow, and
protection violation
3)Software Interrupts
» initiated by executing an instruction (INT or RST)
» used by the programmer to initiate an
interrupt procedure at any desired point in
the program
THANK YOU

More Related Content

Similar to Data Transfer & Manipulation.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 & interconnectionnoman yasin
 
computer architecture
computer architecturecomputer architecture
computer architecturePandiya Rajan
 
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
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processingKamal Acharya
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentationAzhar Khuwaja
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processors9007912
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csaAnjaan Gajendra
 
Control unit design
Control unit designControl unit design
Control unit designDhaval Bagal
 
Pipelining And Vector Processing
Pipelining And Vector ProcessingPipelining And Vector Processing
Pipelining And Vector ProcessingTheInnocentTuber
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.pptChABiDRazZaQ
 
MIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxMIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxJEEVANANTHAMG6
 
Operating system
Operating systemOperating system
Operating systemraj732723
 

Similar to Data Transfer & Manipulation.pptx (20)

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
 
Bc0040
Bc0040Bc0040
Bc0040
 
Patt patelch04
Patt patelch04Patt patelch04
Patt patelch04
 
THE PROCESSOR
THE PROCESSORTHE PROCESSOR
THE PROCESSOR
 
computer architecture
computer architecturecomputer architecture
computer architecture
 
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
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Cpu
CpuCpu
Cpu
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentation
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processor
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csa
 
Control unit design
Control unit designControl unit design
Control unit design
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Pipelining And Vector Processing
Pipelining And Vector ProcessingPipelining And Vector Processing
Pipelining And Vector Processing
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt
 
Cpu
CpuCpu
Cpu
 
MIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxMIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptx
 
Operating system
Operating systemOperating system
Operating system
 

More from Archana Gopinath

DP _ CO Instruction Format.pptx
DP _ CO Instruction Format.pptxDP _ CO Instruction Format.pptx
DP _ CO Instruction Format.pptxArchana Gopinath
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical AnalyzerArchana Gopinath
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyserArchana Gopinath
 
A simple approach of lexical analyzers
A simple approach of lexical analyzersA simple approach of lexical analyzers
A simple approach of lexical analyzersArchana Gopinath
 
A Role of Lexical Analyzer
A Role of Lexical AnalyzerA Role of Lexical Analyzer
A Role of Lexical AnalyzerArchana Gopinath
 
minimization the number of states of DFA
minimization the number of states of DFAminimization the number of states of DFA
minimization the number of states of DFAArchana Gopinath
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite AutomataArchana Gopinath
 
Fundamentals of big data analytics and Hadoop
Fundamentals of big data analytics and HadoopFundamentals of big data analytics and Hadoop
Fundamentals of big data analytics and HadoopArchana Gopinath
 
Map reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICSMap reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICSArchana Gopinath
 
Programming with R in Big Data Analytics
Programming with R in Big Data AnalyticsProgramming with R in Big Data Analytics
Programming with R in Big Data AnalyticsArchana Gopinath
 
If statements in c programming
If statements in c programmingIf statements in c programming
If statements in c programmingArchana Gopinath
 
Guided media Transmission Media
Guided media Transmission MediaGuided media Transmission Media
Guided media Transmission MediaArchana Gopinath
 

More from Archana Gopinath (18)

DP _ CO Instruction Format.pptx
DP _ CO Instruction Format.pptxDP _ CO Instruction Format.pptx
DP _ CO Instruction Format.pptx
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical Analyzer
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyser
 
A simple approach of lexical analyzers
A simple approach of lexical analyzersA simple approach of lexical analyzers
A simple approach of lexical analyzers
 
A Role of Lexical Analyzer
A Role of Lexical AnalyzerA Role of Lexical Analyzer
A Role of Lexical Analyzer
 
minimization the number of states of DFA
minimization the number of states of DFAminimization the number of states of DFA
minimization the number of states of DFA
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Fundamentals of big data analytics and Hadoop
Fundamentals of big data analytics and HadoopFundamentals of big data analytics and Hadoop
Fundamentals of big data analytics and Hadoop
 
Map reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICSMap reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICS
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 
Hadoop
HadoopHadoop
Hadoop
 
Programming with R in Big Data Analytics
Programming with R in Big Data AnalyticsProgramming with R in Big Data Analytics
Programming with R in Big Data Analytics
 
If statements in c programming
If statements in c programmingIf statements in c programming
If statements in c programming
 
un Guided media
un Guided mediaun Guided media
un Guided media
 
Guided media Transmission Media
Guided media Transmission MediaGuided media Transmission Media
Guided media Transmission Media
 
Main Memory RAM and ROM
Main Memory RAM and ROMMain Memory RAM and ROM
Main Memory RAM and ROM
 
Java thread life cycle
Java thread life cycleJava thread life cycle
Java thread life cycle
 
PCSTt11 overview of java
PCSTt11 overview of javaPCSTt11 overview of java
PCSTt11 overview of java
 

Recently uploaded

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
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
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.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 )
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
★ 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
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 

Data Transfer & Manipulation.pptx

  • 1. Data Transfer and Manipulation ARCHANA R, ASSISTANT PROFESSOR IN DEPARTMENTOF CS SACWC.
  • 2. Data Transfer and Manipulation Most computer instructions can be classified into three categories: 2)Data transfer, 2)Data manipulation, 3)Program control instructions
  • 3. Data Transfer Instruction Data transfer instructions move data from one place in the computer to another without changing the data content The most common transfers are between memory and processor registers,between processor registers and input or output,and between the processor registers themselves.
  • 4. NAME Mnemonic Load LD Store ST Move MOV Exchange XC H Input IN Output OU T Push PUSH pop POP Typical Data Transfer Instruction : » Load : transfer from memory to a processor register, usually an AC (memory read) » Store : transfer from a processor register into memory (memory write) » Move : transfer from one register to another register » Exchange : swap information between two registers or a register and a memory word » Input/Output : transfer data among processor registers and input/output device » Push/Pop : transfer data between processor registers and a memory stack
  • 5. Data Manipulation Instruction Data Manipulation Instructions perform operations on data and provide the computational capabilities for the computer. It is divided into three basic types: 1) Arithmetic, 2) Logical and bit manipulation, 3)Shift Instruction
  • 6. Arithmetic Insructions NAME Mnemoni c Increment INC Decrement DEC Add ADD Subtract SU B Multiply MUL Divide DI V Add with carry ADDC Subtract with SUB B borrow Negate (2’s NEG
  • 7. Logical and bit manipulation Insructions NAME Mnemonic Clear CLR Complement COM AND AND OR O R Exclusive-or XOR Clear carry CLR C Set carry SETC complement carry COM C Enable interrupt EI Disable interrupt D I
  • 8. Shift Instructions NAME Mnemoni c Logical shift right SHR Logical shift left SHL Arithmetic shift SHRA right Arithmetic shift SHLA left Rotate right ROR Rotate left ROL Rotate right RORC through carry Rotate left ROLC through carry
  • 9. Program control Program control instructions specify conditions for altering the content of the program counter , while data transfer and manipulation instructions specify condtions for data-processing operations. NAME Mnemonic Branch BR Jump JMP Skip SKP Call CAL L Return RET Compare(by subtraction) CMP Test(by ANDing) TST
  • 10. Status Bit Conditions • It is convinentto supplement the ALU circuit in the CPU with a status register where status bit condition can be stored for further analysis. • Status bits are also called condition code bit or flag bit. • The four status bits are symbolized by C,S,Z and V. • The bits are set or cleared as a result of an operation performed in the ALU
  • 13. Subroutine Call and Return It is a self-contained sequence of instructions that performs a given computational task. During the execution of a program,a subroutine may call when it is called, a branch is executed to the beginning of the subroutine to start executing its set of instructions. After the subroutine has been executed,a branch is made back to the main program.
  • 14. A subroutine call is implemented with the following microoperations: CALL: SP← SP-1: Decrement stack point M[SP] ←PC : Push content of PC onto the stack PC←Effective Address : Transfer control to the subroutine RETURN: PC ← M[SP] : Pop stack and transfer to PC SP ← SP+1 : Increment stack pointer
  • 15. Program Interrupt » Transfer program control from a currently running program to another service program as a result of an external or internal generated request » Control returns to the original program after the service program is executed
  • 16. Types of Interrupts 1)External Interrupts » come from I/O device, from a timing device, from a circuit monitoring the power supply, or from any other external source 2)Internal Interrupts or TRAP » caused by register overflow, attempt to divide by zero, an invalid operation code, stack overflow, and protection violation 3)Software Interrupts » initiated by executing an instruction (INT or RST) » used by the programmer to initiate an interrupt procedure at any desired point in the program