J (E) CXZ is usually used when you have the count value in the CX register, which you use to limit iteration in loops.
JMP is an unconditional jump used to exit loops, enter an API into a non-CALL-based interface, build jump tables, etc.
Conditional jumps are used to change the execution flow based on the conditions of previous calculations. There are many synonyms (described in the link I just provided), and synonyms are usually for obvious reasons. For example, JAE means "Jump if higher or equal." It is synonymous with JNC, which means "Jump if No Carry" and JNB, which means "Jump if not lower." Which you use is just a question for the reader to understand your code:
- If you have just performed an arithmetic operation, you will most likely be interested in the status of the carry flag, so you would name it as JNC.
- If you just made a comparison (CMP operation), you will most likely be more interested in JAE or JNB. What you use depends on what makes the most sense in describing the logic.
This is actually a classic problem in language design: do you make a lot of aliases, making the syntax more complicated in favor of refining semantics, or limiting your βkeywordsβ (here option code mnemonics) is it more difficult to read due to semantics?
source share