Hi,All I has a big problem at coding C51. Put program at specific address in assembler is easy ,it just set org 0xXXXX in progarm. but How to do this in the C51. Thanks
This is a job for the Linker (or, to be precise, the Locator) - not the Compiler. But Keil does provide the _at_ keyword extension.
Hi,Andy Could you get me a sample example, I had read the Absolute Variable Location in C51 document.but it seen only define data's address not program's. Thanks a lot.
My object is let void main(void) start in address 0x8000 and any program start after 0x8000 not less than 0x8000.
You need to look in the Linker Manual
This would be a issue for startup.a51 (Search for CSEG at 0)
"This would be a issue for startup.a51 (Search for CSEG at 0)" That just controls where it puts the jump into the startup code - I don't think it would force the Linker to put the whole thing above 8K? (or at any other specific address).
View all questions in Keil forum