Skip to content
Related Articles

Related Articles

Improve Article
Program execution transfer instructions in 8086 microprocessor
  • Last Updated : 25 May, 2018

Prerequisite – Branching instructions in 8085 microprocessor

Program execution transfer instructions are similar to branching instructions and refer to the act of switching execution to a different instruction sequence as a result of executing a branch instruction.

The two types of program execution transfer instructions are:

  1. Unconditional
  2. Conditional

1. Unconditional Program Execution Transfer Instructions – These instruction always execute.

OpcodeOperandExplanationExample
CALLaddresscalls a subroutine and saves the return address on the stackCALL 2050
RETnonereturns from the subroutine to the main programRET
JUMPaddresstransfers the control of execution to the specified addressJUMP 2050
LOOPaddressloops through a sequence of instructions until CX=0LOOP 2050

Here the address can be specified directly or indirectly.



2. Conditional Program Execution Transfer Instructions : These instructions only execute when the specified condition is true.

OpcodeOperandExplanationExample
JCaddressjump if CF = 1JC 2050
JNCaddressjump if CF = 0JNC 2050
JZaddressjump if ZF = 1JZ 2050
JNZaddressjump if ZF = 0JNZ 2050
JOaddressjump if OF = 1JO 2050
JNOaddressjump if OF = 0JNO 2050
JPaddressjump if PF = 1JP 2050
JNPaddressjump if PF = 0JNP 2050
JPEaddressjump if PF = 1JPE 2050
JPOaddressjump if PF = 0JPO 2050
JSaddressjump if SF = 1JS 2050
JNSaddressjump if SF = 0JNS 2050
JAaddressjump if CF=0 and ZF=0JA 2050
JNBEaddressjump if CF=0 and ZF=0JNBE 2050
JAEaddressjump if CF=0JAE 2050
JNBaddressjump if CF=0JNB 2050
JBEaddressjump if CF = 1 or ZF = 1JBE 2050
JNAaddressjump if CF = 1 or ZF = 1JNA 2050
JEaddressjump if ZF = 1JE 2050
JGaddressjump if ZF = 0 and SF = OFJG 2050
JNLEaddressjump if ZF = 0 and SF = OFJNLE 2050
JGEaddressjump if SF = OFJGE 2050
JNLaddressjump if SF = OFJNL 2050
JLaddressjump if SF != OFJL 2050
JNGEaddressjump if SF != OFJNGE 2050
JLEaddressjump if ZF = 1 or SF != OFJLE 2050
JNGaddressjump if ZF = 1 or SF != OFJNG 2050
JCXZaddressjump if CX = 0JCXZ 2050
LOOPEaddressloop while ZF = 1 and CX = 0LOOPE 2050
LOOPZaddressloop while ZF = 1 and CX = 0LOOPZ 2050
LOOPNEaddressloop while ZF = 0 and CX = 0LOOPNE 2050
LOOPNZaddressloop while ZF = 0 and CX = 0LOOPNZ 2050

Here the address can be specified directly or indirectly.
CF is carry flag
ZF is zero flag
OF is overflow flag
PF is parity flag
SF is sign flag
CX is the register

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

 

My Personal Notes arrow_drop_up
Recommended Articles
Page :