Can someone help on how to pass parameters into a function in PIC assembly language.?
-
-
Answer:
Usually you push the parameters onto the stack. Then the call itself pushes the return address onto the stack, so the callee needs to know to skip over that to get at the parameters. If you want to pass different numbers of parameters to the same function (say there are some optional ones at the end, that may or may not be used, depending on the values of some of the non-optional parameters) then you could use the technique C compilers often use which is to push the last parameters first, so the first parameter is the first one you see looking down into the stack after the return address. Upon return from the called function the caller must be sure to adjust to stack pointer back to where it was before the parameters were pushed, effectively popping them back off the stack.
Auwal M at Yahoo! Answers Visit the source
Related Q & A:
- Can someone tell me how to put a backround for my psp and put pictures in it?Best solution by Yahoo! Answers
- Can someone help me find a study abroad program?Best solution by Yahoo! Answers
- Can someone tell me how to pick a lock?Best solution by wikihow.com
- Can someone tell me how to put a picture on here?Best solution by Yahoo! Answers
- Can someone help me with a cover letter?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.