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 function start address and code length

is there a way to get the start address and code length of a function? I need them in my prog.

thanks,
karah

Parents
  • I have tried in this way, but I can only get the item addresss in calltable.

    So you are using code banking ? In that case, the can of worms mentioned just got a whole lot nastier.

    You could, of course, rip the functions start address out of the call table. There has to be a call to the appropriate address in there.

    The question still is - what are you trying to accomplish ? The '51 architecture does not lend itself too well to doing things like virtual memory. If you are trying to relocate functions to a different address, all non-relative jumps will end up at some meaningless address - instant crash.

Reply
  • I have tried in this way, but I can only get the item addresss in calltable.

    So you are using code banking ? In that case, the can of worms mentioned just got a whole lot nastier.

    You could, of course, rip the functions start address out of the call table. There has to be a call to the appropriate address in there.

    The question still is - what are you trying to accomplish ? The '51 architecture does not lend itself too well to doing things like virtual memory. If you are trying to relocate functions to a different address, all non-relative jumps will end up at some meaningless address - instant crash.

Children
No data