From: <sd...@du...> - 2009-01-06 20:28:43
|
Hello all How can i copy a function pointer to TOSL:TOSH:TOSU? In assembler its pretty simple using HIGH,LOW etc. I tried it using inline assembler, but since the function pointer is a local variable, which i cannot use, I'm helpless. What I want to do is the following in C: movff MY_PTR,STKPTR molw LOW(LOCAL_VARIABLE) mowf TOSL molw HIGH(LOCAL_VARIABLE) mowf TOSH Btw. I declared my function pointer __code void (*ptr)(void); Is this the correct way? It should be a pointer to a function in code. Thanks allot in advance Note: I know about the risks playing around with the hw stack but i need it. Jan |