JNZ & CMP Assembly Instructions

前端 未结 5 610
北恋
北恋 2021-01-31 18:27

Correct me if I am wrong.

This is my understanding of JNZ and CMP.

JNZ - The jump WILL take place if the Z Fl

5条回答
  •  醉话见心
    2021-01-31 19:05

    JNZ is short for "Jump if not zero (ZF = 0)", and NOT "Jump if the ZF is set".

    If it's any easier to remember, consider that JNZ and JNE (jump if not equal) are equivalent. Therefore, when you're doing cmp al, 47 and the content of AL is equal to 47, the ZF is set, ergo the jump (if Not Equal - JNE) should not be taken.

提交回复
热议问题