Professional Documents
Culture Documents
Chapter 2 Lect 4 5 Sept Third Week
Chapter 2 Lect 4 5 Sept Third Week
NOTE: in board examination any instruction out of the five groups are asked
every year.
4) Branching group :
This group of Instructions are used to Alter the normal sequence flow of the programs.
Instructions under this group does not affect any of the flags.
The two types of instructions under this group are Unconditional and Conditional.
Unconditional transfer simply performs the specific operation on the PC (Program Counter) Register.
Whereas Conditional transfer examines/observes one of four Flags and determines if the specific
branch to be executed.
The conditions as follows.
NC NO CARRY (CY=0)
C CARRY (CY=1)
PO PARITY ODD (P=0)
PE PARITY EVEV (P=1)
NZ NOT ZERO (Z=0)
Z ZERO (Z=1)
P PLUS (S=0)
M MINUS (S=1)
The Main instructions under this Group are.
1) JMP Addr
Since this is Unconditional Jump instruction the control is transferred to the
instruction whose address is mentioned in the byte 3 and byte 2..
i.e. ((SP)-1)(PCH)
((SP)-2)(PCL)
(SP)(SP)-2
and
(PC)(BYTE3)(BYTE2)
EG: RET
Instruction length: 1- byte
Addressing mode: Register indirect Addressing Mode
Flags affected : None .
3) Rcondition
If the condition satisfies then this Return instruction loads the content of memory
location whose address is specified in SP reg. to lower-order eight bit of PC reg. ; the
content of the very next memory location (i,.e. SP+1) is loaded in the higher-order 8
bit of the PC and then SP is again incremented by one (i.e. SPSP+2).