Conditional branch instruction-microprocessor, Assembly Language

Conditional branch Instruction

When these type of instructions are executed, they transfer control of execution to the address mention relatively in the instruction, provided the condition implicit in the op code is satisfied, or else, the execution continues in sequence. Here, the conditions mean the status of condition code flags. These types of instructions remain unaffected from any flag. The address has to be mention in the instruction relatively in the terms of displacement which ought to be lie within range -80H to 7FH (or -128 to 127) bytes from the address of the branch instruction. In other terms, only short jumps may be implemented by using the conditional branch instructions.  A label can represent the displacement, if it lies within the above mention range. The different 8086/8088 conditional branch instructions and their operations are listed in the following Table.

2183_conditional branch instruction.jpg


Last four instructions are utilized in the case of on signed binary number and decisions based operations, while all the remaining instructions may be utilized for unsigned binary operations.  The  terms  below  and  above  are usually  utilized for unsigned  numbers, while the terms greater and less are utilized for signed  numbers. A conditional jump instruction that does not examine status flags for condition testing, is following:

JCXZ 'Label' Transfer execution control to address 'Label', if register CX is equal to zero.

The conditional LOOP instructions are shown in following table along with their meanings. These instructions can be used for implement structures like REPEAT_UNTIL, DO_WHILE etc.

1192_cli.jpg

                                         Figure: Conditional loop instructions

The ideas regarding all these instructions will be clearer with the programming practice. This topic is intended at introducing these instructions to the readers. Of course, the examples are quoted wherever possible but the LOOP and the JUMP instructions need a sequence of instructions for explanations and will be emphasized.

 

 

Posted Date: 10/12/2012 5:14:41 AM | Location : United States







Related Discussions:- Conditional branch instruction-microprocessor, Assignment Help, Ask Question on Conditional branch instruction-microprocessor, Get Answer, Expert's Help, Conditional branch instruction-microprocessor Discussions

Write discussion on Conditional branch instruction-microprocessor
Your posts are moderated
Related Questions
Develop an assembly language program for the system and simulate it using MPLAB. From this produce a demo program (in Assembly language) that will run on the MatrixMultimedia Devel

Assembling a program Microsoft Assembler MASM is one of the simple to use and famous assemblers.  All the references and discussions in this section are belonging to the MASM.

Entering a Program In this section, we will explain the procedure for entering a small program on IBM PC with DOS operating system. Assume a program of addition of 2 bytes, as

Compute the Fibonacci sequence - assembly program: Problem: Fibonacci   In this problem you will write a program that will compute the first 20 numbers in the Fibonacci sequ

TEST : Logical Compare Instruction: The TEST instruction performs bit by bit logical AND operation on the 2 operands. Each bit of the result is then set to value I, if the equival

I need a text conversion program written in assembly language

I need a division subroutine. Asks for two inputs, then displays the inputs and shows the answer with a remainder. Mine isnt displaying the inputs correctly.

which uses BIOS interrupt INT 21 to read current system time and displays it on the top-left corner of screen.

IRET : Return from ISR:- When an interrupt service routine is called, before transferring control to it, the IP, CS  register and flag registers are stored in the stack to ment

 Pin Description of 8086 The microprocessor 8086 is a 16-bit CPU available in 3 clock rates, for example 5, 8 and 10 MHz, packaged in a40 pin CERDIP or plastic package. The 8