Subroutine is an instruction sequence in a machine or assembly language program that can be prewritten and referred to as often as needed. Subroutine is used for controlling thing e.g. traffic lights burglar alarms they all use subroutine
A set of instructions that performs a specific task for a main routine, requiring direction back to the proper place in the main routine on completion of the task.
subroutine is nothing but the sub-program or part of that program.
Subroutine mean what (in java)?
marco expand where it invoked ,subroutine will go where the subroutine is defined....
interrupt is a signal caused by I/O devices where as subroutine is a part of the program which is excuted rapidly
a subroutine is a portion of the code within a larger program which performs a specific function and is independent of remaining code.....delay routines are subroutines used for maintaining the timings of various operations in microprocessor
A subroutine call generates additional work for the hardware to perform when activated. A macro in general does not call a subroutine but rather puts the commands in-line inside the loop, resulting in a faster program.
Subroutine mean what (in java)?
The Mechanism that makes possible to transfer control between the calling program and Subroutine is reffered to as SUBROUTINE LINKAGE
marco expand where it invoked ,subroutine will go where the subroutine is defined....
A call to a subroutine. A subroutine is a named/labeled set of commands.
interrupt is a signal caused by I/O devices where as subroutine is a part of the program which is excuted rapidly
in 8085 microprocessor a subroutine is a separate program written aside from main program ,this program is basically the program which requires to be executed several times in the main program. the microprocessor can call subroutine any time using CALL instruction . after the subroutine is executed the subbroutine hands over the program to main program using RET instruction.
The cast of Could It Be - 2008 includes: Richard Wientzek as Subroutine 1 Klas Yngborn as Subroutine 2
Both a function and a subroutine are examples of out-of-line execution calls to code. The main difference is that a function call can be part of an expression and returns a value, whereas the subroutine can be called standalone and does not return a value.
a subroutine is a portion of the code within a larger program which performs a specific function and is independent of remaining code.....delay routines are subroutines used for maintaining the timings of various operations in microprocessor
A subroutine call generates additional work for the hardware to perform when activated. A macro in general does not call a subroutine but rather puts the commands in-line inside the loop, resulting in a faster program.
A stack can be used to implement a subroutine call because the return address is pushed onto the stack, and control transfers to the subroutine. If the subroutine were to then call another subroutine, or even itself, a second return address would be pushed. When the subroutine returns control, the return address is popped off of the stack and control transfers to the return address.In addition, the stack can be used to pass arguments. The caller can push the arguments onto the stack before calling the subroutine. The subroutine can then access the arguments by making references relative to the stack pointer. When the subroutine returns control, the caller then pops the arguments off of the stack.Further, the subroutine can use the stack to store local variables. It adjusts the stack pointer in the direction of pushing things onto the stack, and then make references to that region of memory between the original value of the stack pointer and the new value of the stack pointer.This is exactly how most subroutines work on the 8086/8088 (and higher) processors...The caller pushes arguments on the stackThe caller calls the subroutine, pushing the return address on the stackThe subroutine pushes caller registers onto the stack, if that is the agreed convention for that callThe subroutine pushes the BP register on the stack and then copies the stack pointer (SP) to BPThe subroutine adjusts SP downward, allocating the required local memoryThe subroutine accesses arguments with [BP+offset] addressingThe subroutine accesses local variables with [BP-offset] addressingWhen the subroutine is done, it sets SP back to BP, pops caller's registers off of the stack, pops caller's return address off of the stack, and then returns to the callerThe caller then pops the arguments off of the stack.The structure in memory, representing arguments, return address, saved registers if needed, and local variables, with BP in the center, is called a stack frame.Done properly, a subroutine can be fully recursive, even able to call itself, or be called by other threads, because all local variables and the registers if saved are stored on the stack. The ability to be recursive is also called reentrancy.
* Function * Subroutine * Procedure