Part V: Conditionals, Jumping, and Looping
This guide is part five of the series, X86–64 Assembly Language Program. Conditionals and Looping Assembly language supports conditionally jumping to a specific line of the code. Looping is actually just a special implementation of jumping. It’s a jump to the beginning of the “loop” until some condition is finally met. Essentially this post is about writing conditional statements to branch one of two ways depending on some condition. The core conditional operator is cmp which is short for ‘compare’. The cmp operator compares two values and then sets some flags indicating the relation of the two values. Flags can be checked using some other operators, namely: ...