Instruction Set
4-78
JA
Jump If Above
JA
JNBE
Jump If Not Below or Equal
What It Does
If the previous instruction clears the Carry Flag (CF) and the Zero Flag (ZF), JA and JNBE
stop executing the current sequence of instructions and begin executing a new sequence
of instructions; otherwise, execution continues with the next instruction.
Syntax
Description
JA and JNBE test the flags set by a previous instruction. The terms
above and below
indicate an unsigned number comparison. If the given condition is true, a short jump is
made to the location provided as the operand.
Operation It Performs
Flag Settings After Instruction
Form
Opcode
Description
Clocks
Am186 Am188
JA
rel8
77
cb
Jump short if above (CF=0 and ZF=0)
13,4
13,4
JNBE
rel8
77
cb
Jump short if not below or equal (CF=0 and ZF=0)
13,4
13,4
JA
label
JNBE
label
To jump if the result of a previous
unsigned comparison was above, use
JA or its synonym, JNBE. Both forms
perform the same operation.
if ((CF == 0) && (ZF == 0))
{
/* extend sign of label */
if (
label < 0)
displacement = 0xFF00 |
label;
else
displacement = 0x00FF &
label;
/* branch to labeled instruction */
IP = IP + displacement;
}
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
–
–
–
–
–
– res – res – res –
4
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...