Cmp-arithmetic instruction-microprocessor, Assembly Language

CMP: Compare: - This instruction compares the source operand, which can be a register or memory location an immediate data with a destination operand that might be a register or a memory location. For the purpose of comparison, it subtracts the  source  operand  from  the destination  operand  but does  not stock up the result anywhere. The flags are affected and depending on the result of the subtraction. If both of the operands are equal to zero flag is set. If the source operand is higher than the destination operand, carry flag is set or else is reset. The instance of this instruction are following:

Example :

1. CMP      BX,         0100H          Immediate

2. CMP      0100                          Immediate [AX implicit]

3. CMP      [5000H],OIOOH          Direct

4. CMP      BX,         [SI]               Register indirect

5. CMP      BX,         CX                Register

 

Posted Date: 10/12/2012 1:33:15 AM | Location : United States







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

Write discussion on Cmp-arithmetic instruction-microprocessor
Your posts are moderated
Related Questions
Declare 1 constant. This can be done just below the prototype section. Put the following divider above the constant section. ;************************ Constants ****************

what is double hashing

Multiply two numbers by using shift and rotate instruction

This is a short program to practice assembly language loops and if/else statements. You will use various jump commands and the cmp instruction. The program will generate a random

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

Write an assembly language program to perform a rot13 1 conversion on characters in a text file.  The program should read charatcers from the input file, perform the rot13 convers

SHR : Shift Logical Right: This instruction performs bit-wise right shifts on the operand word or byte that might be reside in  a memory location or a register, by the specified c

NOT : Logical Invert: The NOT instruction complements (inverts) the contents of an a memory location or operand register bit by bit. The instance are as following: Example :

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

define accounting.briefly explain the accounting concepts which guide the accountant at the recording stage.