I want to knwo How can I give starting address of a fucntion. I want to know for both a function written in C and even in assembly.
The reason I require is that, in P89V51RD2 when I use to do IAP at that time precaution require is that the function which is used for IAP should not be in the 0x0000 to 0x2000 location. and I dont know how compiler is going to assign the start address so what I have to do is that I have to start downloading code form 0x2000H location. so my 8K memory is waste.. But If I can assign the start adrress then I can easly locate the the function below 0x2000H location.
So I want to know for both a Function written in C and even in Assemble.
When we are defining a variable at that time we can fixe its location using _at_ keyword.
Same way how can I fixe the address of fucntion written C and assembly??
Each .c file is normally its own segment with C51, typically called ?PR?file.
See the BL51 linker directive CODE or the LX51 directive SEGMENTS for placing a particular segment at a particular address.
You can also use the linker to locate variables. The _at_ keyword is an extension intended for convenience. But it's really the linker's job to select addresses for code and data.