So, I resolved that alignment issue. To tell the truth it was the effect and not the cause... :roll:

Now I have another problem (I hope it will be the last one...). I have a function in a c library that requires as parameter a pointer to a void function:

Code:
typedef void (* VoidFunctionPointer)(void);
void irqSet(IRQ_MASK irq, VoidFunctionPointer handler);
I have translated it as:
[pascal]procedure irqSet(irq: IRQ_MASK; handler: Pointer); cdecl; external;[/pascal]

and it works if I use it in this way:

[pascal]irqSet(IRQ_VBLANK, @myProcedure);[/pascal]

Now the problem comes if I try to pass to irqSet a void function that is implemented in another c library:
Code:
extern void Wifi_Interrupt();
translated as:
[pascal]procedure Wifi_Interrupt(); cdecl; external;[/pascal]
hangs on:
[pascal]irqSet(IRQ_WIFI, @Wifi_Interrupt);[/pascal] :scratch: