Keil Logo



For our application, we need to locate romcode (flash) at offset 0x8000. We know that there are 3 steps are involved (set CSEG at 0x8000, relocate interrupt vectors with INTVECTOR(0x8000), and specify linker options). We modified the startup.a51 and our project.

We converted the linker output to a binary image and programmed it into FLASH at address 0x8000. When this code ran (started from internal rom), it seems that our external interrupt 0 handler (located at 0x8003) is not called. Instead, the internal rom interrupt handler (located at 0x0003) is called when the interrupt happens. The FLASH code at 0x8003 shows a LJMP to 0x84C3 which is ok.

Is there something tricky we don't see?


When the external interrupt 0 occurs, the 8051 AUTOMATICALLY jumps to address 0x0003. There is nothing you can do to the 8051 MCU to make it jump to 0x8003. You must make a change to the software in your internal ROM. In the internal ROM, you need to place an LJMP 0x8003 at address 0x0003. You can do that with the following short assembly routine.

cseg at 00003h
LJMP 08003h

That should fix it.

Last Reviewed: Monday, June 7, 2004

Did this article provide the answer you needed?
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.