Keil Logo

A51: RELOCATING RESET AND INTERRUPT VECTORS


Information in this article applies to:

  • C51 All Versions

QUESTION

I'm using the evaluation version of the µVision2 IDE and I'm creating an assembly program. When I create my program, I can't execute the reset vector or any interrupt vectors. I'm creating the reset vector and interrupt vectors as relocatable segments.

reset   segment code
        rseg    reset
        jmp     main

inter   segment code
        rseg    inter
        jmp     ex0_isr

junk    segment code
        rseg    junk
main:
        nop
        jmp     main

ex0_isr:
        nop
        jmp     ex0_isr

end

How can I create the reset vector and interrupt vectors in the evaluation software?

ANSWER

You must use the CSEG directive to create the reset and interrupt vectors. Then use RSEG to create your code segments. For example:

cseg at 0
        jmp     main

cseg at 3
        jmp     ex0_isr

junk    segment code
        rseg    junk

main:
        nop
        jmp     main

ex0_isr:
        nop
        jmp     ex0_isr

end

SEE ALSO

Last Reviewed: Monday, August 21, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.