JUMP&LOOP
INSTRUCTION
JUMP INSTRUCTION IN 8086
MICROPROCESSOR
JUMP INSTRUCTIONS ARE USED FOR CHANGING THE
FLOW OF EXECUTION OF INSTRUCTIONS IN THE
PROCESSOR.
IF WE WANT JUMP TO ANY INSTRUCTION IN BETWEEN
THE CODE, THEN THIS CAN BE ACHIEVED BY THESE
INSTRUCTIONS.
THERE ARE TWO TYPES OF JUMP INSTRUCTIONS:
1.UNCONDITIONAL JUMP INSTRUCTIONS
2.CONDITIONAL JUMP INSTRUCTIONS
Unconditional Jump
Instructions
 Unconditional jump instruction does not check for any
flag instruction
JC : Stands for 'Jump if Carry'
It checks whether the carry flag is set or not. If yes, then jump takes place, that is: If CF = 1,
then jump
JE / JZ : Stands for 'Jump if Equal' or 'Jump if Zero'
It checks whether the zero flag is set or not. If yes, then jump takes place, that is: If ZF = 1,
then jump.
JNE / JNZ : Stands for 'Jump if Not Equal' or 'Jump if Not Zero'
It checks whether the zero flag is reset or not. If yes, then jump takes place, that is: If ZF = 0,
then jump.
Conditional Jump Instruction
 Conditional jump instruction must be check for any
flag instruction
MOV AL,255
ADD AL,1
JC label 1
PRINT ‘no carry’
JMP exit
label 1:
PRINT ‘has carry’
exit:
RET
Example:
JP / JPE : Stands for 'Jump if Parity' or 'Jump if Even Parity'
It checks whether the Parity flag is set or not. If yes, then jump takes place, that is: If
PF = 1, then jump.
JNP / JPO : Stands for 'Jump if Not Parity' or 'Jump if Odd Parity'
It checks whether the Parity flag is reset or not. If yes, then jump takes place, that
is: If PF = 0, then jump.
 The Loop instructions use the CX register to indicate
the loop count.
 The Loop instruction decrements CX without changing
any flags
 If CX is not zero after the decrement, control is
transferred to the destination label
Loop Instruction

Jump&Loop instruction

  • 1.
  • 2.
    JUMP INSTRUCTION IN8086 MICROPROCESSOR JUMP INSTRUCTIONS ARE USED FOR CHANGING THE FLOW OF EXECUTION OF INSTRUCTIONS IN THE PROCESSOR. IF WE WANT JUMP TO ANY INSTRUCTION IN BETWEEN THE CODE, THEN THIS CAN BE ACHIEVED BY THESE INSTRUCTIONS. THERE ARE TWO TYPES OF JUMP INSTRUCTIONS: 1.UNCONDITIONAL JUMP INSTRUCTIONS 2.CONDITIONAL JUMP INSTRUCTIONS
  • 3.
    Unconditional Jump Instructions  Unconditionaljump instruction does not check for any flag instruction
  • 4.
    JC : Standsfor 'Jump if Carry' It checks whether the carry flag is set or not. If yes, then jump takes place, that is: If CF = 1, then jump JE / JZ : Stands for 'Jump if Equal' or 'Jump if Zero' It checks whether the zero flag is set or not. If yes, then jump takes place, that is: If ZF = 1, then jump. JNE / JNZ : Stands for 'Jump if Not Equal' or 'Jump if Not Zero' It checks whether the zero flag is reset or not. If yes, then jump takes place, that is: If ZF = 0, then jump. Conditional Jump Instruction  Conditional jump instruction must be check for any flag instruction
  • 5.
    MOV AL,255 ADD AL,1 JClabel 1 PRINT ‘no carry’ JMP exit label 1: PRINT ‘has carry’ exit: RET Example: JP / JPE : Stands for 'Jump if Parity' or 'Jump if Even Parity' It checks whether the Parity flag is set or not. If yes, then jump takes place, that is: If PF = 1, then jump. JNP / JPO : Stands for 'Jump if Not Parity' or 'Jump if Odd Parity' It checks whether the Parity flag is reset or not. If yes, then jump takes place, that is: If PF = 0, then jump.
  • 6.
     The Loopinstructions use the CX register to indicate the loop count.  The Loop instruction decrements CX without changing any flags  If CX is not zero after the decrement, control is transferred to the destination label Loop Instruction