
Instruction Set
4-97
JLE
Jump If Less or Equal
JLE
JNG
Jump If Not Greater
What It Does
If the previous instruction sets the Zero Flag (ZF), or modifies the Sign Flag (SF) and the
Overflow Flag (OF) so that they are not the same, JLE and JNG stop executing the current
sequence of instructions and begin executing a new sequence of instructions; otherwise,
execution continues with the next instruction.
Syntax
Description
JLE and JNG test the flags set by a previous instruction. The terms
greater and less indicate
an integer (signed) comparison. If the given condition is true (ZF=1 or SF
≠
OF), 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
JLE
rel8
7E
cb
Jump short if less or equal (ZF=1 or SF
≠
OF)
13,4
13,4
JNG
rel8
7E
cb
Jump short if not greater (ZF=1 or SF
≠
OF)
13,4
13,4
JLE
label
To jump if the result of a previous integer
comparison was less or equal, use JLE
or its synonym, JNG. Both forms perform
the same operation.
JNG
label
if ((ZF == 1) || (SF != OF))
{
/* 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...