Hello
Placing interrupt code in a section called PAGED_ROM is just confusing for everybody I think.
I would recommend you to fix the issue in 2 steps:
1- Place the interrupt functions code in a user define section called INTERRUPT_CODE for instance.
This is done as follows:
#pragma push#pragma CODE_SEG __NEAR_SEG INTERRUPT_CODE// interrupt handler here....#pragma pop
2- Place the INTERRUPT_CODE section appropriately in the .prm file.
For this modify the placement block from
PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */ DEFAULT_RAM, /* non-zero page variables */ INTO RAM; _PRESTART, /* startup code */ STARTUP, /* startup data structures */ ROM_VAR, /* constant variables */ STRINGS, /* string literals */ VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */ NON_BANKED, /* runtime routines which must not be banked */ DEFAULT_ROM, COPY /* copy down information: how to initialize variables */ INTO ROM; /* ,ROM1,ROM2: To use "ROM1,ROM2" as well, pass the option -OnB=b to the compiler */ PAGED_ROM /* routines which can be banked */ INTO PPAGE_0,PPAGE_0_1,PPAGE_2,ROM1,ROM2;
to
PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */ DEFAULT_RAM, /* non-zero page variables */ INTO RAM; _PRESTART, /* startup code */ STARTUP, /* startup data structures */ ROM_VAR, /* constant variables */ STRINGS, /* string literals */ VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */ NON_BANKED, /* runtime routines which must not be banked */ INTERRUPT_CODE, COPY /* copy down information: how to initialize variables */ INTO ROM; /* ,ROM1,ROM2: To use "ROM1,ROM2" as well, pass the option -OnB=b to the compiler */ DEFAULT_ROM, PAGED_ROM /* routines which can be banked */ INTO PPAGE_0,PPAGE_0_1,PPAGE_2,ROM1,ROM2;
CrasyCat