AnsweredAssumed Answered

Problem with __far function pointer in S12XEP100

Question asked by Lukasz Prymula on Jul 6, 2009
Latest reply on Jul 7, 2009 by Lukasz Prymula


In my project I use function pointers. Memory is banked. I dont use X-Gate


 typedef struct        {
  volatile        Byte            (*__far proc_pointer) (void);        // pointer do wykonania procedury
} pseq_pdat;


Byte            pseq_addproc        (Byte *name, void *__far pointer)    // dodanie procedury do kolejki
volatile    pseq_dat        *pseq_datx;   
volatile    pseq_pdat       *pseq_pdatx;
pseq_pdatx[i].proc_pointer = (Byte (* __far) (void))pointer;          



In code I use a function for ex:

pseq_addproc((Byte*)"SysLed Timer", &Tmr_SysLed);


In map file function Tmr_SysLed has address 0xFEA3E6. But when I run debug mode I see the pointer has address: 0xFE2B07. There are no functions at this address, but there is struct pseq_datx. I dont now why pointer points to bad address ;/


Best regard