This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Function pointer parameter

From C,I called an assembly function passing in generic pointer and a function pointer.

I can access the first parameter (generic pointer) by taking in the values from R2 and R1 but I have difficulty getting the second parameter. By testing out the function written in C, I am using

MOV @DPTR,#?_FUNCTION?BYTE+03H

to access the parameter value but it turns out that it is not the correct value of the function address. This assembly function is suppose to get the address of the function (therefore the function pointer is passed in) and store it in another location.

Can anyone please advise? Is there any significance because the parameter passed in is a function pointer pointing to the code segment?

Thank you in advance.

0