answersLogoWhite

0


Best Answer

MP Compares the first source operand with the second source operand and sets the status flags in the EFLAGS register according to the results. The comparison is performed by subtracting the second operand from the first operand and then setting the status flags in the same manner as the SUB instruction. When an immediate value is used as an operand, it is sign-extended to the length of the first operand.

So, only the flags are affected.

Operation:

temp = Source1 - SignExtend(Source2);

ModifyStatusFlags(); //Modify status flags in the same manner as the SUB instruction

Flags affected:

The CF, OF, SF, ZF, AF, and PF flags are set according to the result.

User Avatar

Anonymous

Lvl 1
3y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which registers are changed by the cmp instruction?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between instruction registers and instruction pointer?

instruction register is used to store the next instruction to be executed. instruction pointer is used to store the address of the next instruction to be executed.


What causes a po342 code?

i have checked the voltage to the cmp, and i have changed the cmp! the code will not clear, and i have a hard start. just installed new engine!


Instruction Buffer Register?

An Instruction Buffer Register is also known as IBR. It registers a computer's processor or its Central Processing Unit (CPU).


Which register or registers are used as an offset address for the string instruction destination in the microprocessor?

EAX


User visible register?

Registers that are used during prigramming and specified directly by the instruction.


How program instructions transfer in and out of memory?

The instructions have to remain in memory at all times while the program is running. They get there by loading the entire program into memory. The CPU's instruction registers keep track of the current instruction and the next instruction.


What register points to the next instruction?

actually register holds the data..there are 6 register which are temporary registers..program counter holds the address of next instruction to be fetched..instruction register holds the currently executed data...


What is function of nop in microprocessor?

The NOP instruction is short for no-operation. It is an executable instruction that does nothing to the processor, its registers, or its flags. It is useful in timing loops, or to provide room for patchabilty of a piece of code.


What does CMP stand for?

CMP stands for Compare


What does cmp meaning cmp?

Call my phone .


What are the important instruction set design issues?

# Operation repertoire: How many and which operations to provide, and how complex operations should be # Data types: The various types of data upon which operations are performed # Instruction format: Instruction length (in bits), number of addresses, size of various fields, and so on. # Registers: Number of CPU registers that can be referenced by instructions, and their use. # Addressing: The mode or modes by which the address of an operand is specified


How many bits are needed within a machine code instruction to select a single register in a machine with 16 general registers?

4