0% found this document useful (0 votes)
20 views10 pages

Program Control Instruction Sequecing (DCS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views10 pages

Program Control Instruction Sequecing (DCS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Topic :

Program control instruction


sequencing

Presented by :
Priyanshi Solanki
(B.Tech CSE)
INTRODUCTION
• This topic explains the program control instructions,
including the jumps, calls, return and many more
instructions.

• This also presents the relational assembly language


statements(.IF, .ELSE, .ELSEIF, .ENDIF, .WHILE, .REPEAT, .
UNTIL)
Program control
• A program control type of instruction, when executed may change the address value in the program
counter and cause the flow of control to be altered.

• The change in the value of program counter as a result of the execution of a program control
instruction causes a break in the sequence of instruction execution.
Branch : one address instruction
Jump : conditional / unconditional
condition
1. True – PC – new effective address
2. False – PC – next address in sequence
Skip : skip the next instruction
Call : used with subroutines / procedures
Return :

Compare(by subtraction) : used to set condition for


branch instructions by
updating status bits.
Test(by ANDing) :
Uses :

 These instructions are used to transfer the


program control –
• to jump from one memory location to any other memory
loaction within a program.

• from one program to another program called as subroutine.


Example :

We want to execute first line of our program, then second line and
third line but after executing third line, we may want to skip fourth
line and jump to the fifth line. In such conditions, we use control
instructions.
Status bit conditions (flag registers)

To check different conditions for branching instructions like CMP (compare) or test can be used
certain status bit condition are set as a result of these operations.

V Z S C

Status bits mean that the value will be either 0 or 1 as it is a bit. We have four status bits:
•"V" stands for Overflow
• "Z" stands for Zero
•"S" stands for the Sign bit
• "C" stands for Carry.
• Overflow(V) is based on certain bits, i.e., if extra bits are generated into our operation. Then
we have Zero (Z).
• If the output of the ALU(Arithmetic Logic Unit) is 0, then the Z flag is set to 1, otherwise, it is
set to 0.
• If the number is positive, the Sign(S) flag is 0, and if the number is negative, the Sign flag is 1.
• We have Carry(C), if the output of the thirst ALU operation generates Carry, then C is set to 1,
else C is set to 0.
THANK
YOU

You might also like