More Jumps
Notes
- This is Jorgensen chapter 7.7
- jmp is an unconditional jump.
- Last time we looked at a set of conditional jump instructions.
- Assemblers add more then these basic jumps.
- But first
cmp
-
cmp op1, op2
- Op1 and op2 must be the same size
- op2 can not be an immediate
- Both can not be memory
- The operands are not changed
- But the appropriate bits in the flag register are set.
- The assembler then can use any conditional branching instruction
- They depend on the type of numbers compared.
- je, jne
- Work for signed and unsigned data.
- Jump equal, jump not equal
- For signed numbers
- jl, jle (jump less, jump less equal)
- jg, jge (jump greater, jump greater equal)
- For unsigned numbers
- jb, jbe (jump below, jump below equal)
- ja, jae (jump above, jump above equal)
- The jumps from last time too.
- They are summarized on the cheat sheet.