 | Discussion Forum |  |
|
|
Specifying the start addressNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Mohammad Adel Posted 27-Jun-2004 15:28 GMT Toolset C51 |  Specifying the start address Mohammad Adel 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 | | Read-Only Author Dan Henry Posted 27-Jun-2004 17:18 GMT Toolset C51 |  RE: Specifying the start address Dan Henry Not with the C language or the C compiler. It's a linker parameter. | | Read-Only Author Mohammad Adel Posted 27-Jun-2004 17:44 GMT Toolset C51 |  RE: Specifying the start address Mohammad Adel So, how can it be changed?
Thanx | | Read-Only Author Jon Ward Posted 27-Jun-2004 18:05 GMT Toolset C51 |  RE: Specifying the start address Jon Ward Take a look at the following knowledgebase article:
http://www.keil.com/support/docs/189.htm
Jon | | Read-Only Author Drew Davis Posted 29-Jun-2004 00:02 GMT Toolset C51 |  RE: Specifying the start address Drew Davis 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. | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|