A large program is difficult to implement even if an algorithm is available, hence it should be split into number of independent tasks which can be easily designed and implemented. The process of splitting a large program into small tasks and designing them independently is known as modular programming.

Large program are more prone to errors and it is difficult to locate and isolate errors. A repeated group of instruction in a program can be organized as subprograms. These subprograms are called as subroutine or procedure in assembly language programming which allows reuse of program code. A procedure is a set of the program statements that can be processed independently.

Advantage of procedures:

  1. Simple modular programming.
  2. Reduced work load and development time.
  3. Debugging of the program and procedure becomes easy.
  4. Reduction in the size of the main program.
  5. Reuse of the procedure many times in the same program or in another program.
  6. Library of the procedures can be implemented by combining well designed, tested and proven procedures.

Disadvantages of procedures:

  1. Extra code is required to integrate procedures, like CALL and RET instructions.
  2. Required extra overhead while establishing a linkage between the calling program and the called procedure or vice versa, hence execution takes more time.
  3. As the run time overhead required for communication between small procedures is more than the execution time of the procedure and hence the use of small procedures are not preferable, instead, macro can be used.

Sobre El Autor

Administrador de ENGGDRCAOS. Canal dedicado especialmente a la formación del estudiante que aspira a ser ingeniero. Todos los videos son Ingles. Apasionado del universo Apple, estudiante de Ingeniería y Gamer por vocación.