Subprogram and its Characteristics Last Updated : 21 Jan, 2022 Comments Improve Suggest changes Like Article Like Report A Subprogram is a program inside any larger program that can be reused any number of times. Characteristics of a Subprogram: (1) A Subprogram is implemented using the Call & Return instructions in Assembly Language. (2) The Call Instruction is present in the Main Program and the Return(Ret) Instruction is present in the subprogram itself. (3) It is important to note that the Main Program is suspended during the execution of any subprogram. Moreover, after the completion of the subprogram, the main program executes from the next sequential address present in the Program Counter. (4) For the implementation of any subprogram, a "Stack" is used to store the "Return Address" to the Main Program . Here, Return Address means the immediately next instruction address after the Call Instruction in the Main program. This Return Address is present inside the Program Counter. Thus during the execution of the Call Instruction, the Program Counter value is first pushed to the Stack as the Return Address and then the Program Counter value is updated to the given address in the Call Instruction. Similarly, during the execution of Return(Ret) Instruction, the value present in the stack is popped and the Program Counter value is restored for further execution of the Main Program. (5) The Main advantage of Subprogram is that it avoids repetition of Code and allows us to reuse the same code again and again. Comment More infoAdvertise with us Next Article Subprogram and its Characteristics S shreya garg 4 Follow Improve Article Tags : Computer Organization and Architecture Similar Reads Characteristics of Computer System A computer is a fast electronic device that processes raw data, performs arithmetic and logical operations, and produces output. Nowadays, the computer has become a part of our life and can be used in most fields. In a computer, there are various characteristics of computer systems depending on thei 4 min read Computer Organization and Architecture Tutorial In this Computer Organization and Architecture Tutorial, youâll learn all the basic to advanced concepts like pipelining, microprogrammed control, computer architecture, instruction design, and format. Computer Organization and Architecture is used to design computer systems. Computer architecture i 5 min read Last Minute Notes Computer Organization Table of ContentBasic TerminologyInstruction Set and Addressing ModesInstruction Design and FormatControl UnitMemory Organization I/O InterfacePipeliningIEEE Standard 754 Floating Point NumbersBasic TerminologyControl Unit - A control unit (CU) handles all processor control signals. It directs all i 15+ min read Difference between Von Neumann and Harvard Architecture Von Neumann and Harvard architectures are the two basic models in the field of computer architecture, explaining the organization of memory and processing units in a computer system. For those involved in Computer Science or working in companies providing computing technologies, it is essential to u 5 min read Simplified Instructional Computer (SIC) Simplified Instructional Computer (SIC) is a hypothetical computer that has hardware features that are often found in real machines. There are two versions of this machine: SIC standard ModelSIC/XE(extra equipment or expensive)Object programs for SIC can be properly executed on SIC/XE which is known 4 min read Like