Thanks for reply!
Sometimes it is useful to read a documentation
. Thath right my function pointer points to data not function. So I modify my code like that:
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Byte pseq_addproc (Byte *name, void * pointer) // dodanie procedury do kolejki
{
void (*__far FunPtr)(void)= Tmr_SysLed;
...
pseq_pdatx[i].proc_pointer = FunPtr;
...
}
That works fine but I dont use input *pointer from function pseq_addproc but I openly write pointer to function Tmr_SysLed fo FunPtr and later to structure pseq_pdatx. I have no idea how write input pointer to structure instead od FunPtr like now.
In line
pseq_addproc((Byte*)"SysLed Timer", &Tmr_SysLed);
I have warning Pointer conversion: possible loss of data, so pointer is ony 16 bit wide ;/
Earlier I have no problem here because of using large memory model and pointer was always 23 bit wide. When I modify function like that:
pseq_addproc (Byte *name, void *__far pointer),
pointer is 23 bit wide but points to bad address (page is wrong), for example:
Tmr_SysLed has address: a3d5FE
pointer points to: a3d57F
Message Edited by cs_Lukasz on 2009-07-07 10:50 AM