The subroutine is a program to which the CPU temporarily branches from the main program so to perform a special function. Before entering y the subroutine, the main program places the parameters either in the registers or in the memory locations. Also, the place in the main program from where the branch is made to the subroutine is remembered by storing the program counter value in the memory or the CPU register. A CALL statement in the main program causes the branch to the subroutine. The subroutine retrieves the required parameters and performs the operations. Then, the subroutine (called program) transfers control to the main (calling) program. This is achieved by using illustrates the subroutine concept.