
Instruction Set
4-108
JNE
JNE
Examples
This example subtracts an integer or an unsigned number in DX from another number of
the same type in AX, and then uses the difference to determine the course of action. SUB
and JNE implement a construct equivalent to a C-language
if statement.
Tips
If you need to jump to an instruction at
farlabel that is more than 128 bytes away, use the
following sequence of statements:
JE nearlabel
; This does the equivalent of a long jump
JMP farlabel
; based on the JNE condition.
nearlabel:
Related Instructions
If you want to
See
Compare two components using subtraction and set the flags accordingly
CMP
Jump if the result of a previous integer or unsigned comparison was equal
JE
Jump unconditionally
JMP
Set the flags according to whether particular bits of a component are set to 1
TEST
; branch according to the result of the integer or
; unsigned subtraction
SUB
AX,DX
; are AX and DX the same?
JNE
DIFFERENCE
; if not, then jump
...
DIFFERENCE:
...
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...