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

Get an address of function

I am using 89v51RD2.
my question is how to push an address of a function on to stack in C??
For the same how do I get address of a function??
Plz Help.

Parents
  • >>> on to the stack instead of address from where ISR got called.

    Do you really want to modify(!) the return address on the stack?
    The return address back to "somewhere" in the main application?
    Because you write "instead" and not "in addition".

    I would have understood if you wrote:
    "Want to push the address of an additional function, to which the RETI will jump, and the RET of that function will then return to the main application that was interrupted before".

    Even this is not a good programming style, a stack overflow may occur.

Reply
  • >>> on to the stack instead of address from where ISR got called.

    Do you really want to modify(!) the return address on the stack?
    The return address back to "somewhere" in the main application?
    Because you write "instead" and not "in addition".

    I would have understood if you wrote:
    "Want to push the address of an additional function, to which the RETI will jump, and the RET of that function will then return to the main application that was interrupted before".

    Even this is not a good programming style, a stack overflow may occur.

Children