answersLogoWhite

0

With Linux being mostly written in C and normally interfaced via C libraries, I'll give an example from the C point of view, thus I'll refer to functions in place of sub routines.

Using the following C function as an example:

int add(int number1, int number2) { return (number1 + number2); }

Before the add function is called, the values of its arguments are pushed onto the stack by the caller in reverse order (number2 then number1).

When the function is called, it reads the values of number1 and number2 from the stack into CPU registers where the addition is done, leaving the answer in register eaxbefore returning from the function.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is subroutine in java?

Subroutine mean what (in java)?


Why may you recommend the use of a macro instead of a subroutine inside a loop in a program?

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.


What Linux will work on HP 2540p?

quicker answer is which linux distro does not work? Pretty much all will work


What are subroutine linkages?

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


Who do you work archos 5 android on Linux?

You can work archos 5 android on Linux through a tablet.


Why do your earphones fail to work when you are using Linux yet they work properly in windows?

Either, you need to increase the volume in Linux or Linux did not recognize your sound card.


Does Safari work on Linux?

No.


Does every Linux software work on every Linux distro?

I don't think so.


Does Windows Update work on Linux?

No.


Does mineshafter work on Linux?

yes


What is main difference between macro and subroutins?

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


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.