×

Embedded Systems Tutorial

AVR Microcontroller

8051 Microcontroller

8085 Microprocessor

8086 Microprocessor

8255 Microprocessor

Embedded Systems Practice

Jump Instructions in 8086 Microprocessor

In this tutorial, we will learn about the various Jump instructions that are used for changing the flow of the instruction execution in the 8086 Microprocessor. By Monika Sharma Last updated : May 15, 2023

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

1) Unconditional Jump Instructions

These instructions are used to jump on a particular location unconditionally, i.e. there is no need to satisfy any condition for the jump to take place. There are three types of procedures used for unconditional jump. They are:

  1. NEAR – This procedure targets within the same code segment. (Intra-segment)
  2. SHORT - This procedure also targets within the same code segment, but the offset is 1 byte long. (Intra-segment)
  3. FAR - In this procedure, the target is outside the segment and the size of the pointer is double word. (Inter-segment)
Syntax:     JMP  procedure_namememory_location
Example:    JMP  short  target

2) Conditional Jumps

In these types of instructions, the processor must check for the particular condition. If it is true, then only the jump takes place else the normal flow in the execution of the statements is maintained.

The ALU operations set flags in the status word (Flag register). The conditional jump statements tests the flag and jump is the flag is set.

There are following types of conditional jump instructions:

i) 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.

ii) JNC : Stands for 'Jump if Not Carry'

It checks whether the carry flag is reset or not. If yes, then jump takes place, that is: If CF = 0, then jump.

iii) 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.

iv) 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.

v) 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.

vi) 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.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.