 | Discussion Forum |  |
|
|
Function pointer parameterNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author W twh Posted 9-Feb-2004 13:04 GMT Toolset C51 |  Function pointer parameter W twh 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. | | Read-Only Author Andrew Neil Posted 9-Feb-2004 13:09 GMT Toolset C51 |  RE: Function pointer parameter Andrew Neil http://www.keil.com/support/man/docs/c51/c51_ap_ctoasm.htm http://www.keil.com/support/man/docs/c51/c51_ap_datastorage.htm | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|