Conditional branch instruction-microprocessor, Assembly Language

Assignment Help:

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.

 

 


Related Discussions:- Conditional branch instruction-microprocessor

8086, to separate positive and negative numbers

to separate positive and negative numbers

8255 programmable peripheral interface-microprocessor, 8255 Programmable Pe...

8255 Programmable Peripheral Interface Intel's 8255 A programmable peripheral interface provides a nice instance of a parallel  interface. As shown the interface have a control

#largest number, #write a program 8086 to find the largest number

#write a program 8086 to find the largest number

Assignment, 1. Write an assembly program that adds the elements in the odd ...

1. Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register? array1 DWORD 10, 20, 30, 40, 50, 6

Define word (dw)- assemblers directive-microprocessor, DW : Define Word:- ...

DW : Define Word:- The DW directive serves the same purposes as the DB directive, but now it makes the assembler  which reserves thenumber ofmemory words (16-bit) instead of by

Format of control register-microprocessor, Format of Control Register T...

Format of Control Register The format for the control register is given in Figure. Bit 0 of this register might be one before data may be output  and  bit  two  might be  one

Program for measures the wind direction-vane, You are to create an assembly...

You are to create an assembly program for the MSP430 that correctly measures the wind direction, to a precision of 45° (N, NW, W, SW, S, SE, E, NE), using the MSP430's ADC. Your

Write an assembly language program to fi nd the maximum, Write an assembly ...

Write an assembly language program to find the maximum of: y = x 6 - 14x 2 + 56x for the range -2 ≤ x ≤ 4, by stepping one by one through the range. The program should in

Scas-string manipulation instruction-microprocessor, SCAS : Scan String By...

SCAS : Scan String Byte or String Word:- This instruction scans a string of words or byte for an operand word or byte specified in the register AL or  register AX. The string i

Assignment, Write an assembly program that adds the elements in the odd ind...

Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd