Control Instructions

Program is a set of instructions. We know that each instruction of the program is executed by processor. Processor executes instructions one by one. Whatever we write in our program is executed in the same order as they appear in the program. We can say processor executes instructions in a sequential manner. At a particular instant processor is executing some line of code, we say control of processor is on that line. Processor’s control moves from one line to another. This movement of control is known as flow of the program.






Sometimes, it is required that the program’s flow shouldn’t be sequential. For example, we want to execute first line of our program, then second and third line but after executing third line, we may want to skip fourth line and jump to the fifth line. In such situations, we use control instructions.

Control instruction gives power to decide the flow of the program.

There are four types of control instructions:

  1. Decision control instruction
  2. Iterative control instruction
  3. Switch case control instruction
  4. goto instruction

We will see each of these instructions one by one in subsequent chapters.

Control Instruction