7.5. 7.5 The Conditional Jump Instructions

Although the jmp instruction provides transfer of control, it does not allow you to make any serious decisions. The 80×86's conditional jump instructions handle this task. The conditional jump instructions are the basic tool for creating loops and other conditionally executable statements like the if..endif statement.

The conditional jumps test one or more flags to see if they match some particular pattern (just like the setcc instructions). If the flag settings match, the instruction transfers to the target location. If the match fails, the CPU ignores the conditional jump and execution continues with the next instruction. Some conditional jump instructions simply test the setting of the sign, carry, ...

Get Art of Assembly Language, 1st Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.