Instruction set?

jav

jav

@jav-UiRG79 Oct 22, 2024
What are the conditions of CMP instruction?

if its "CMP B"
what flag is set at the A>B?
what flag is set at the A=B?
what flag is set at the A<B?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • narayana murthy

    narayana murthy

    @narayana-z4W16q Mar 23, 2011

    i think it is given on the program based
  • yanivx

    yanivx

    @yanivx-gvxfxa Mar 23, 2011

    The compare instruction CMP subtracts the two operands but does not store the results. What it does do is set flags, in particular, zero, negative, carry, parity, and auxillary carry, so you can follow up the instruction with a conditional branch or call instruction to perform some operation based on the comparison of those two numbers.....

  • yanivx

    yanivx

    @yanivx-gvxfxa Mar 23, 2011

    jav
    What are the conditions of CMP instruction?

    if its "CMP B"
    what flag is set at the A>B?
    what flag is set at the A=B?
    what flag is set at the A<B?
    flag is set to 0 when A=B
    parity flag is set when A>B
    carry flag is set when A<B
    Here A stands for the value stored in the Accumulator..
    njoy.... 😉
  • narayana murthy

    narayana murthy

    @narayana-z4W16q Mar 23, 2011

    nice answer buddy