Discussion Forum

Change the offset for the interrupt vector

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Ingvar Kreft
Posted
2-Jul-2004 09:20 GMT
Toolset
C51
New! Change the offset for the interrupt vector
Hi
I working with 89c669 and want to change the program start address to 0x016000h.
But when I try to change the Interrupt vector to that address I get
"Invalid Interrupt Vector Address !"
Why can't i use a Address greater than 0xffff?
Read-Only
Author
Ingvar Kreft
Posted
2-Jul-2004 10:22 GMT
Toolset
C51
New! RE: Change the offset for the interrupt vector
Hi
More ?

I was looking at the appnote http://www.keil.com/support/docs/189 but this is for C51 how can I do this on CX51

Open START_MX.A51 Can't find CSEG at 0000h
Try to write CSEG at 816000h gets ERROR
"START_MXB.A51(139): error A80: INVALID ABSOLUTE BASE/OFFS VALUE"

Try to write CSEG at 8000h gets no ERROR
but take a look in the HEX file and see that the program starts at 0x0000h
Read-Only
Author
Russell Bull
Posted
4-Jul-2004 09:48 GMT
Toolset
C51
New! RE: Change the offset for the interrupt vector
I didn't think the '669 supported any more than the usual 64k for the code and data areas. For all intents and purposes, the '669 is just a C51 with a few enhancements. Short of having code banking, I doubt the '669 will go past 0xffff for addresses. If we were talking about a C251 then that is a different kettle of fish.
Read-Only
Author
Ingvar Kreft
Posted
5-Jul-2004 08:26 GMT
Toolset
C51
New! RE: Change the offset for the interrupt vector
Hi
669 supports up to 8MB of extern program and 8MB Data memory.
Read-Only
Author
Jon Ward
Posted
5-Jul-2004 17:06 GMT
Toolset
C51
New! RE: Change the offset for the interrupt vector
The CSEG statement defines and selects a CODE segment (similar to myseg segment code at address, rseg myseg). The CODE area is limited to 64K. That's why you get the errors you do. You'll need to use the SEGMENT and RSEG statements to create an ECODE segment.

However, a not-so-obvious problem is that the reset vector is at address 0 and the first interrupt is at address 3. You probably don't want to overwrite the interrupt vector with an EJMP instruction (required for JMPs to ECODE). So, you should probably create an LJMP to a code segment and then from there EJMP to the actual program.

Jon
Read-Only
Author
Ingvar Kreft
Posted
6-Jul-2004 08:15 GMT
Toolset
C51
New! RE: Change the offset for the interrupt vector
Hi
My idea is to set the bootvector to 016000h,
so the reset will start at that address.

Next Thread | Thread List | Previous Thread Start a Thread | Settings