I have a question about JNE. I use ollydbg and ReverseMe tutorial.

In JNE condition, the zero flag is equal to 1. and it mean the arithmetic result is zero. Right?

The Z=1 meaning the condition is true and it want to jump to Error message??? and If i change the zero flag to 0 (Z=0), it mean false? and ignore the Error message??

JNE = Jump If not Equal. So whats that mean? if not equal to .. ? What does it compare to?

i confused ... enter image description here

1 Answer 1


JNE is an alias for JNZ because the CMP instruction will set ZF to 1 if the two values being compared are equal. So you can read it as “jump if not zero flag”, or “jump if ZF is not set”, or “jump if ZF is 0”.

In your specific case, the jump will be taken if eax is not equal to -1.

  • So bases on CMP eax,-1 , it's equal ? eax is fffff !
    – Jason
    Commented Dec 14, 2020 at 12:24
  • @Jason it’s checking for equality but jumping if not equal
    – Igor Skochinsky
    Commented Dec 14, 2020 at 13:43
  • Thank you. is there any source to understand assembly codes?
    – Jason
    Commented Dec 14, 2020 at 14:00
  • Yes, for example Intel Assembly Manual.
    – morsisko
    Commented Dec 14, 2020 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.