A subroutine is a group of instructions that will be used repeatedly in different locations of the program. Rather than repeat the same instructions several times, they can be grouped into a subroutine and than called at different locations... it can exist anywhere in the program even separately from the main program.
Subroutines generally used in microprocessor are:
- Multiple ending subroutines
- Nested subroutines
- Multiple ending subroutine
I know what subroutine is, and I can also make a theory on 'multiple ending subroutine' on the basis of its name... BUT, I need a proper explanation of the same.
If anyone can explain all these three types of subroutines, that'll be great otherwise just explain "MULTIPLE ENDING SUBROUTINE" :)