Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <u>jcc<b> jump on condition flags: not altered</b></u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Jcc             Jump on condition                    Flags: Not altered

Jcc location

        Logic   if condition
                   eIP . location_offset
                endif

    Conditional jumps (except JCXZ/JECXZ) test the flags which have
    been set by a previous instruction. If the given condition is
    true, a jump is made to the location provided as the operand.

    Instruction coding is most efficient when the target for the
    conditional jump is within -128 to +127 bytes of the next
    instruction's first byte (short jump).
    On the 80386+, the jump can also target -32768 through 32767
    (segment size attribute 16) or -2 to the 31st power through +2 to
    the 31st power - 1 (segment size attribute 32) relative to the
    next instruction's first byte.


    A condition code (cc) is associated with each instruction to
    indicate the condition being tested for. The terms "above" and
    "below" are used for un-signed integers; "less" and "greater" for
    signed integers.
    Note that several mnemonics have the same meaning.


    Instruction     Jump if ...                           Flags
    JA, JNBE        Above, Not Below or Equal             CF=0 AND ZF=0
    JAE, JNB, JNC   Above or Equal, Not Below, Not Carry  CF=0
    JBE, JNA        Below or Equal, Not Above             CF=1 OR ZF=1
    JB, JC, JNAE    Below, Carry, Not Above or Equal      CF=1
    JE, JZ          Equal, Zero                           ZF=1
    JNE, JNZ        Not Equal, Not Zero                   ZF=0
    JP, JPE         Parity, Parity Even                   PF=1
    JNP, JPO        No Parity, Parity Odd                 PF=0

    JG, JNLE        Greater, Not Less or Equal            SF=OF AND ZF=0
    JGE, JNL        Greater or Equal, Not Less            SF=OF
    JLE, JNG        Less or Equal, Not Greater            SF<>OF OR ZF=1
    JL, JNGE        Less, Not Greater or Equal            SF<>OF
    JO              Overflow                              OF=1
    JNO             No Overflow                           OF=0
    JS              Sign (negative)                       SF=1
    JNS             No Sign (positive)                    SF=0


    Opcode                              Format
    short;  near;      near;            'Near' forms available on 386+
    70 cb;  0F 80 cw;  0F 80 cd         JO  rel8/rel16/rel32
    71 cb;  0F 81 cw;  0F 81 cd         JNO rel8/rel16/rel32
    72 cb;  0F 82 cw;  0F 82 cd         JB  rel8/rel16/rel32
    73 cb;  0F 83 cw;  0F 83 cd         JAE rel8/rel16/rel32
    74 cb;  0F 84 cw;  0F 84 cd         JE  rel8/rel16/rel32
    75 cb;  0F 85 cw;  0F 85 cd         JNE rel8/rel16/rel32
    76 cb;  0F 86 cw;  0F 86 cd         JBE rel8/rel16/rel32
    77 cb;  0F 87 cw;  0F 87 cd         JA  rel8/rel16/rel32
    78 cb;  0F 88 cw;  0F 88 cd         JS  rel8/rel16/rel32
    79 cb;  0F 89 cw;  0F 89 cd         JNS rel8/rel16/rel32
    7A cb;  0F 8A cw;  0F 8A cd         JP  rel8/rel16/rel32
    7B cb;  0F 8B cw;  0F 8B cd         JNP rel8/rel16/rel32
    7C cb;  0F 8C cw;  0F 8C cd         JL  rel8/rel16/rel32
    7D cb;  0F 8D cw;  0F 8D cd         JGE rel8/rel16/rel32
    7E cb;  0F 8E cw;  0F 8E cd         JLE rel8/rel16/rel32
    7F cb;  0F 8F cw;  0F 8F cd         JG  rel8/rel16/rel32


    Length and timing
    Operands    Bytes   8088    186     286     386     486     Pentium
    near8        2      4/16    4/13    3/7+m   3/7+m   1/3     1    PV
    near16       3       -       -       -      3/7+m   1/3     1    PV

                       Cycles for:  no jump/jump

See Also: Flags JCXZ JMP LAHF SAHF SETcc

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson