Programming Techniques for Repeated Task YASH PAL, March 19, 2026March 19, 2026 The programming techniques are used to perform the repeated task. A loop is set up by instructing the microprocessor to change the sequence of execution and perform the task again on the next data. Three functions are to be performed to set up a loop. Indexing: To point to the next data. Counting: To count for the end of available data. Branching: Change the sequence and perform the task again. Indexing An index means a pointer which point to the stored data. According to this programming technique, a register pair is used to store the address of the first data. When the task has been performed on the pointed data, the pointer is incremented by one. Now the task is repeated again on the newly pointed data. It is important to note that in indexing programming technique, the register pair is used to point to the data instead of using a direct address. Counting This programming technique allows programmers to count how many times the instruction or a segment of the program is to be executed. For that number, a counter is set. The value of the counter is decremented each time one iteration is completed. This process is repeated till the counter reaches zero. Branching After the task is completed one time, the same instructions are repeated with new data. To repeat the execution of the instruction again and again, it is required that the last instruction should branch the sequence of execution to the first instruction of the loop. The desired branching instruction can be conditional or unconditional. On the basis of this, the branching programming technique may be classified into two groups: Continuous loop Conditional loop A continuous loop is an infinite loop that never ends. It is also known as an unconditional loop. Whereas a conditional loop repeats the task till the condition is satisfied. If the condition is not fulfilled, the loop is ended, and execution comes out of the loop. The continuous and unconditional loop flow charts are shown in the figure below. Continuous/Conditional Loop Flow Chart engineering subjects Microprocessor microprocessor