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

Starting code at another location

I'd like to reposition my code so all code starts at 0800h. The only things I want below that are the startup vector and interrupt vectors.
Am I right in assuming that the vector at locn 0000 (actually an LJMP address) cannot be relocated as this is the start point after a reset? Is it also true that the interrupt vectors are similarly fixed?
Using uVision.

Parents
  • I have tried this from the Knowledgebase
    http://www.keil.com/support/docs/76.htm
    But I used $1000 as my code start address. This produced a reset vector at $1000, Interrupt vectors from $1003 and code after the int vectors. I figured I didn't need the interrupt vectors relocated to set the interrupt vector offset back to zero. This produced a reset vector at $1000, interrupt vectors at $0003 and code at $1003 (after reset vector.) I have played around with the C51 and BL51 options and cannot get ALL vectors in zero page and code from $1000. The only way I have found of achieving this is by setting CSEG AT 0 in STARTUP and location the code at $1000 in the BL51 size/location. This doesn't seem right to me. I have yet to test it as I don't have my programmer at the moment.

Reply
  • I have tried this from the Knowledgebase
    http://www.keil.com/support/docs/76.htm
    But I used $1000 as my code start address. This produced a reset vector at $1000, Interrupt vectors from $1003 and code after the int vectors. I figured I didn't need the interrupt vectors relocated to set the interrupt vector offset back to zero. This produced a reset vector at $1000, interrupt vectors at $0003 and code at $1003 (after reset vector.) I have played around with the C51 and BL51 options and cannot get ALL vectors in zero page and code from $1000. The only way I have found of achieving this is by setting CSEG AT 0 in STARTUP and location the code at $1000 in the BL51 size/location. This doesn't seem right to me. I have yet to test it as I don't have my programmer at the moment.

Children