Assembly – JG/JNLE/JL/JNGE after CMP

When you do a cmp a,b, the flags are set as if you had calculated a – b. Then the jmp-type instructions check those flags to see if the jump should be made. In other words, the first block of code you have (with my comments added): would jump to label1 if and only if al was greater than dl. You’re probably better … Read more