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

Specifying the start address

In assembly, the "ORG" directive can be used to specify the start address of the code.

Can this be done in C? if possible then How?

..Thanx

Parents
  • C programs begin at main(), by definition. You could use the linker relocation controls to move the location of main().

    It's more likely that you want to move all of your code. See the article Jon posted. Or, if you want a fixed address so that some other bit of code can call your code, you probably want to begin earlier than main() itself. See STARTUP.A51.

Reply
  • C programs begin at main(), by definition. You could use the linker relocation controls to move the location of main().

    It's more likely that you want to move all of your code. See the article Jon posted. Or, if you want a fixed address so that some other bit of code can call your code, you probably want to begin earlier than main() itself. See STARTUP.A51.

Children
No data