
Instruction Set
4-82
JB
Jump If Below
JB
JC
Jump If Carry
JNAE
Jump If Not Above or Equal
What It Does
If the previous instruction sets the Carry Flag (CF), JB, JC, and JNAE stop executing the
current sequence of instructions and begin executing a new sequence of instructions;
otherwise, execution continues with the next instruction.
Syntax
Description
JB, JC, and JNAE test the flag 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
JB
rel8
72
cb
Jump short if below (CF=1)
13,4
13,4
JC
rel8
72
cb
Jump short if carry (CF=1)
13,4
13,4
JNAE
rel8
72
cb
Jump short if not above or equal (CF=1)
13,4
13,4
JB
label
To jump if the result of a previous
unsigned comparison was below or
equal
, use JB or one of its synonyms, JC
or JNAE. Each form performs the same
operation.
JC
label
JNAE
label
if (CF == 1)
{
/* 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 –
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...