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
Program : Write an assembly program to find out the number of positive numbers and negative numbers from a given series of signed numbers. Solution : Take the i th num

Motorola 68000 Series : 68000microprocessor is a 16 bit processor that has addressing space of 65536 locations, each of which holds a 64-bits word; In order to address those lo

This unit introduces the topic of evaluating interactive products. It is a short unit as evaluation is discussed in more detail in Block 4. Its brevity should give you additional t

CMPS : Compare String Byte or String Word:-The CMPS instruction may be utilized to compare two strings of Words or byte. The length of the string ought to be stored in the CX. If

How to define procedures?

MOVSW/MOVSB : Move String Word or String Byte: Imagine a string of bytes, stored in a set  of consecutive memory locations is to be moved to another set of  the destination locati

CISC Characteristics : The design of an instruction  set for a computer  might take into consideration  not only machine language constraints,  but  also  the  requirements  i

Why is the capability to relocate processes desirable?

Why is the capability to relocate processes desirable?

programs