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

Absolute address for FUNCTIONS in CODE-space

Does anyone knows a methode, to declare a function in a specific CODE address in C51?
Something lika a org xxxx in assembler !

Parents
  • What you're doing with your two functions is a combination of traditional C51 techniques "code banking" and "xdata banking". Neither would strictly need any knowledge about absolute memory locations for functions if you had let the C compiler help you doing it.

    If you insist doing it on your own, you'll have to investigate the suggestions you already got: put functions in separate segments, let the linker place those segments at fixed locations.

Reply
  • What you're doing with your two functions is a combination of traditional C51 techniques "code banking" and "xdata banking". Neither would strictly need any knowledge about absolute memory locations for functions if you had let the C compiler help you doing it.

    If you insist doing it on your own, you'll have to investigate the suggestions you already got: put functions in separate segments, let the linker place those segments at fixed locations.

Children
No data