JE/JNE directives
Purpose:
Passes process control to the specified instruction if the first operand in the previous CMP instruction was equal to (not equal to for JNE) the second operand.Syntax:
- JE NUM1
JNE NUM2JE passes process control to the instruction in memory location NUM1 if the first operand is equal to the second; JNE does the same if the first operand is not equal to the second.
- CMP AX,[10A0]
JE 1322
The values in AX and memory location 10A0 are compared; if the value in AX is equal to the value in memory location 10A0, then process control is continued to the instruction in memory location 1322.