answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What are the variables of a subroutine?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

You need to understand a subroutine's in order to use it?

You need to understand a subroutine's ____ in order to use it. a. internal structure b. local variables c. programming style d. interface


How can a stack be used for implementing a subroutine call?

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.


What is subroutine in java?

Subroutine mean what (in java)?


What are subroutine linkages?

The Mechanism that makes possible to transfer control between the calling program and Subroutine is reffered to as SUBROUTINE LINKAGE


How do you include subroutine VACKRL in synon generated code?

To include a subroutine VACKRL in Synon generated code, you need to first define the subroutine in the Generate All Model. In the action diagram, call the subroutine using the CALL operation passing any required parameters. Finally, regenerate the code for the model to incorporate the changes and ensure the subroutine is included in the generated code.


What is main difference between macro and subroutins?

marco expand where it invoked ,subroutine will go where the subroutine is defined....


Mention the importance of subroutines in programming?

A subroutine is typically defined as being a function or procedure that can be invoked at any point in a program, causing the procedural execution to branch to the subroutine. This is not unlike a goto or jump statement, however subroutines also make use of the program's call stack to allow values (arguments or parameters) to be passed to the subroutine, including the address of the caller so that execution can return to the point of the call when the subroutine falls from scope. A subroutine can also (optionally) return a single value to the caller, known as the return value. Return values are temporary and will fall from scope when the expression that invoked the subroutine falls from scope. However, by assigning a subroutine to a variable, the return value can be stored in that variable and can then used in subsequent expressions. Subroutines pop their arguments from the stack and construct local variables or references from the argument values. Arguments passed by reference can therefore be used to return values through the referenced values. Values returned in this manner are known as output arguments. Subroutines that use output arguments often use the subroutine's temporary return value to indicate any errors that occurred within the subroutine, with zero indicating success (no error).


What is a single computer function that initiates a string of commands?

A call to a subroutine. A subroutine is a named/labeled set of commands.


What is the role of the constructor?

Several meanings for "constructor". In object-oriented programming, it is the subroutine used to create an object. The programmer can add commands here, to get the object ready for his needs; for example, initialize the variables used in the object.


What is subroutine?

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


Difference between interrupt and subroutine in computer?

interrupt is a signal caused by I/O devices where as subroutine is a part of the program which is excuted rapidly


What is subroutine in 8085?

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.