Professional Documents
Culture Documents
Lecture#12
Lecture#12
Lecture#12
Flow Control Instructions
Flow control instructions for jumps, loops and
conditional jumps allow us to control the
execution of program statements and to build high-
level programming structures such as if-else
statements and loops in assembler programs.
Compare instruction
The compare instruction is used to compare two
numbers.
Example:
CMP AX, BX
Jump Instructions
The jump instructions are used to transfer the flow
of the program to the indicated operator.
Example:
JMP unconditional
The Conditional Unsigned Jump
Instructions
Used after comparisons of unsigned numbers.
Instruction Meaning
JE JZ Jump if zero flag set. i.e. last result
equal 0
JNE JNZ Jump if zero flag not set. i.e. last
result not equal 0