In assembly language we must place labels and the appropriate type of branch instructions to branch to the labels at appropriate points in the structure to implement the control structures we want. The fact that the branch instructions allow us to place a label anywhere in our program and branch to it opens programmers up to the danger of using them in an undisciplined manner. The idea of control structures was developed and control structures were introduced into high level languages in order to prevent the development of spaghetti code. A good way to prevent this happening in assembly language is to design the program using the control structures of high level languages and to implement these control structures in a standard, consistent way using the branch instructions provided by the language. As we saw in the above examples to implement the control structures we need both conditional and unconditional branching .
All assembly languages provide both types of branch instructions.
The jmp instruction has the form jmp label where label is a label on a statement in the executable portion of the program. A section introduced by the .text directive. The effect of the instruction is to cause the labeled statement to be the next instruction executed. The statement contains this statement's address encoded in its operand field and the execution of the instruction is to place this address in the PC, the program counter. The effect of this is to cause this instruction to be the next instruction to be the next one fetched and executed.