"J" Instructions

Norton Guide - Índice


JA - Jump If Above

See Also: JNBE, JAE, JG, JBE

Flags not altered

JA short-label

Logic:
Jump if CF = 0 and ZF = 0

Used after a CMP or SUB instruction, JA transfers control to short- label if the first operand (which should be unsigned) was greater than the second operand (also unsigned). The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JA ABOVE

Note:JNBE, Jump Not Below or Equal, is the same instruction as JA.
JA, Jump on Above, should be used when comparing unsigned numbers.
JG, Jump on Greater, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JAE - Jump If Above or Equal

See Also: JNB, JA, JGE, JB

Flags not altered

JAE short-label

Logic:
Jump if CF = 0

Used after a CMP or SUB instruction, JAE transfers control to short- label if the first operand (which should be unsigned) was greater than or equal to the second operand (also unsigned). The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JAE ABOVE_EQUAL

Note: JNB (Jump Not Below) is the same instruction as JAE.
JAE, Jump on Above or Equal, should be used whencomparing unsigned numbers.
JGE, Jump on Greater or Equal, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JB - Jump If Below

See Also: JNAE, JC, JL, JAE

Flags not altered

JB short-label

Logic:
Jump if CF = 1

Used after a CMP or SUB instruction, JB transfers control to short- label if the first operand was less than the second.(Both operands are treated as unsigned numbers.)The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JAE BELOW

Note: JC (Jump if Carry), JB, and JNAE (Jump if Not Above or Equal), are all synonyms for the same instruction.
JB, Jump if Below, should be used when comparing unsigned numbers.
JL, Jump if Less Than, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JBE - Jump If Below or Equal

See Also: JNA, JLE, JA

Flags not altered

JBE short-label

Logic:
Jump if CF = 1 or ZF = 1

Used after a CMP or SUB instruction, JBE transfers control to short- label if the first operand was less than or equal to the second. (Both operands are treated as unsigned numbers.)The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JBE NOT_ABOVE

Note: JNA, Jump if Not Above, is the same instruction as JBE.
JBE, Jump if Below or Equal, should be used when comparing unsigned numbers.
JLE, Jump if Less Than or Equal, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JC - Jump If Carry

See Also: JB, JNAE, JNC

Flags not altered

JC short-label

Logic:
Jump if CF = 1

JC transfers control to short-label if the Carry Flag is set. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JC CARRY_SET

Note: JB (Jump if Below), JC, and JNAE (Jump if Not Above or Equal) are all synonyms for the same instruction.
Use JNC, Jump if No Carry, to jump if the carry flag is clear.

Norton Guide - ÍndiceÍndice


JCXZ - Jump If CX Register Zero

See Also: LOOP, LOOPE, LOOPZ, LOOPNZ, LOOPNE

Flags not altered

JCXZ short-label

Logic:
Jump if CX = 0

JCXZ transfers control to short-label if the CX register is 0. The target of the jump must be within -128 to +127 bytes of the nextinstruction.

Operands Clocks Transfers Bytes Example
short-label 18 or64 - 2 JCXZ COUNT_DONE

Note: This instruction is commonly used at the beginning of a loop to bypass the loop if the counter variable (CX) is at 0.

Norton Guide - ÍndiceÍndice


JE - Jump If Equal

See Also: JZ, JNE

Flags not altered

JE short-label

Logic:
Jump if ZF = 1

Used after a CMP or SUB instruction, JE transfers control to short- label if the first operand is equal to the second operand. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JE ZERO

Note: JZ, Jump if Zero, is the same instruction as JE

Norton Guide - ÍndiceÍndice


JG - Jump If Greater

See also: JNLE, JA, JLE

Flags not altered

JG short-label

Logic:
Jump if ZF = 0 and SF = OF

Used after a CMP or SUB instruction, JG transfers control to short- label if the first operand is greater than the second. (Both operands are treated as signed numbers.)The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JG GREATER

Note: JNLE, Jump if Not Less or Equal, is the same instruction as JG.
JA, Jump if Above, should be used when comparing unsigned numbers.
JG, Jump if Greater, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JGE - Jump If Greater or Equal

See also: JNL, JAE, JL

Flags not altered

JGE short-label

Logic:
Jump if SF = OF

Used after a CMP or SUB instruction, JGE transfers control to short- label if the first operand is greater than or equal to the second. (Both operands are treated as signed numbers.)The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JGE GREATER_EQUAL

Note: JNL, Jump if Not Less, is the same instruction as JGE.
JAE, Jump if Above or Equal, should be used when comparing unsigned numbers.
JGE, Jump if Greater or Equal, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JL - Jump If Less

See Also: JNGE, JB, JGE

Flags not altered

JL short-label

Logic:
Jump if SF <> OF

Used after a CMP or SUB instruction, JL transfers control to short- label if the first operand is less than the second. (Both operands are treated as signed numbers.)The target of the jump must be within - 128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JL LESS

Note: JNGE, Jump if Not Greater or Equal, is the same instruction as JL.
JB, Jump if Below, should be used when comparing unsigned numbers.
JL, Jump if Less, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JLE - Jump If Less or Equal

See Also: JNG, JBE, JNA, JG

Flags not altered

JLE short-label

Logic:
Jump if SF <> OF or ZF = 1

Used after a CMP or SUB instruction, JLE transfers control to short- label if the first operand is less than or equal to the second . (Both operands are treated as signed numbers.)The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JLE NOT_GREATER

Note: JNG, Jump if Not Greater, is the same instruction as JLE.
JBE, Jump if Below or Equal, should be used when comparing unsigned numbers.
JLE, Jump if Less or Equal, should be used when comparing signed numbers.

Norton Guide - ÍndiceÍndice


JMP - Jump Unconditionally

See also: CALL, RET, SHORT, NEAR, FAR, PROC, EA

Flags not altered

JMP target

Logic:
Jump always

JMP always transfer control to the target location. Unlike CALL, JMP does not save IP, because no RETurn is expected. An intrasegment JMP may be made either through memory or through a 16-bit register; an intersegment JMP can be made only through memory.

Operands Clocks Transfers Bytes Example
short-label 15 - 2 JMP ROPE_NEAR
near-label 15 - 3 JMP SAME_SEGMENT
far-label 15 - 5 JMP FAR_LABEL
memptr16 18+EA - 2-4 JMP SAME_SEG
regptr16 11 - 2 JMP BX
memptr32 24+EA - 2-4 JMP NEXT_SEG

Note: If the assembler can determine that the target of an intrasegment jump is within 127 bytes of the current location, the assembler will automatically generate a short-jump (two-byte) instruction; otherwise, a 3- byte NEAR JMP is generated.
You can force the generation of a short jump by explicit use of the operator "short," as in:

	JMP short_near_by

Norton Guide - ÍndiceÍndice


JNA - Jump If Not Above

See Also: JBE, JLE

Flags not altered

JNA short-label

JNA is a synonym for JBE. See the description for JBE.

Norton Guide - ÍndiceÍndice


JNAE - Jump If Not Above or Equal

See Also: JB, JL

Flags not altered

JNAE short-label

JNAE is a synonym for JB. See the description for JB.

Norton Guide - ÍndiceÍndice


JNB - Jump If Not Below

See Also: JAE, JGE

Flags not altered

JNB short-label

JNB is a synonym for JAE. See the description for JAE.

Norton Guide - ÍndiceÍndice


JNBE - Jump If Not Below or Equal

See Also: JA, JG

Flags not altered

JNBE short-label

JNBE is a synonym for JA. See the description for JA.

Norton Guide - ÍndiceÍndice


JNC - Jump If No Carry

See Also: JC

Flags not altered

JNC short-label

Logic:
Jump if CF = 0

JNC transfers control to short-label if the Carry Flag is clear. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JNC CARRY_CLEAR

Note: Use JC, Jump if Carry, to jump if the carry flag is set.

Norton Guide - ÍndiceÍndice


JNE - Jump If Not Equal

See Also: JNZ, JE

Flags not altered

JNE short-label

Logic:
Jump if ZF = 0

Used after a CMP or SUB instruction, JNE transfers control to short- label if the first operand is not equal to the second. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JNE NOT_EQUAL

Note: JNZ, Jump if Not Zero, is the same instruction as JNE.

Norton Guide - ÍndiceÍndice


JNG - Jump If Not Greater

See Also: JLE, JBE

Flags not altered

JNG short-label

JNG is a synonym for JLE. See the description for JLE.

Norton Guide - ÍndiceÍndice


JNGE - Jump If Not Greater or Equal

See Also: JL, JB

Flags not altered

JNGE short-label

JNGE is a synonym for JL. See the description for JL.

Norton Guide - ÍndiceÍndice


JNL - Jump If Not Less

See Also: JGE, JAE

Flags not altered

JNL short-label

JNL is a synonym for JGE. See the description for JGE.

Norton Guide - ÍndiceÍndice


JNLE - Jump If Not Less or Equal

See Also: JG, JA

Flags not altered

JNLE short-label

JNLE is a synonym for JG. See the description for JG.

Norton Guide - ÍndiceÍndice


JNO - Jump If No Overflow

See Also: JO, INTO

Flags not altered

JNO short-label

Logic:
Jump if OF = 0

JNO transfers control to short-label if the Overflow Flag is clear. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JNO NO_OVERFLOW

Note: Use JO, Jump if Overflow, to jump if the overflow flag is set.

Norton Guide - ÍndiceÍndice


JNP - Jump If No Parity

See Also: JP, JPO

Flags not altered

JNP short-label

Logic:
Jump if PF = 0

JNP transfers control to short-label if the Parity Flag is clear. The target of the jump must be within -128 or +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JNP ODD_PARITY

Note: JPO, Jump if Parity Odd, is the same instruction a JNP.
Use JP, Jump on Parity, to jump if the parity flag is set.

Norton Guide - ÍndiceÍndice


JNS - Jump If No Sign

See Also: JS

Flags not altered

JNS short-label

Logic:
Jump if SF = 0

JNS transfers control to short-label if the Sign Flag is clear. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JNS AQUARIUS

Note: Use JS, Jump if Sign, to jump if the sign flag is set.

Norton Guide - ÍndiceÍndice


JNZ - Jump If Not Zero

See Also: JNE, JE

Flags not altered

JNZ short-label

JNZ is a synonym for JNE. See the description for JNE.

Norton Guide - ÍndiceÍndice


JO - Jump If Overflow

See Also: JNO, INTO

Flags not altered

JO short-label

Logic:
Jump if OF = 1

JO transfers control to short-label if the Overflow Flag is set.The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JO SIGNED_OVERFLOW

Note: Use JNO, Jump if No Overflow, to jump if the overflow flag is clear.

Norton Guide - ÍndiceÍndice


JP - Jump If Parity

See Also: JPE, JNP

Flags not altered

JP short-label

Logic:
Jump if PF = 1

JP transfers control to short-label if the Parity Flag is set. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JP EVEN_PARITY

Note: JPE, Jump if Parity Even, is the same instruction as JP.
Use JNP, Jump if No Parity, to jump if the Parity Flag is clear.

Norton Guide - ÍndiceÍndice


JPE - Jump If Parity Even

See Also: JP, JNP

Flags not altered

JPE short-label

JPE is a synonym for JP. See the description for JP.

Norton Guide - ÍndiceÍndice


JPO - Jump If Parity Odd

See also: JNP, JP

Flags not altered

JPO short-label

JPO is a synonym for JNP. See the description for JNP.

Norton Guide - ÍndiceÍndice


JS - Jump If Sign

See also: JNS

Flags not altered

JS short-label

Logic:
Jump if SF = 1

JS transfers control to short-label if the Sign Flag is set. The target of the jump must be within -128 to +127 bytes of the next instruction.

Operands Clocks Transfers Bytes Example
short-label 16 or 4 - 2 JS NEGATIVE

Note: Use JNS, Jump if No Sign, to jump if the sign flag is clear.

Norton Guide - ÍndiceÍndice


JZ - Jump If Zero

See also: JE, JNE

Flags not altered

JZ short-label

JZ is a synonym for JE. See the description for JE.

Norton Guide - ÍndiceÍndice


Última actualização: 02 Maio 2005

Norton Guide - Índice