I have made a little loader for 8051f300 of cygnal , this loader is located from 0x0000 to 0x9ff. With this loader i can install application through rs232 in memory from 0xa02 to 0x1dff. I have reserved 2 byte (0x0a00 0xa01) for the version of application installed. This is the big problem..... I have compiled the application , and have inserted in linker the line CODE (?PR?0xa02......etc) for the program and is all OK. but.... How i can insert in the code of application , 2 byte for the version in 0xa00 and 0xa01 location ?? Sorry for my lame english. Thank to all
In C: Declare an initialized two-byte array of memory class 'code', in a segment of its own, and instruct the linker to put that at 0xa00. See the section on 'absolute memory addresses' in the Manual for further details. In ASM:
CSEG ORG 0xa00 DB VERSION_HI, VERSION_LO
You can find another way of doing it in: http://www.keil.com/support/docs/301.htm
WORKK!!! Thank to all !