2003-11-16 20:23:48 +01:00
|
|
|
/* copied from _Palm Programming_ p. 79*/
|
|
|
|
|
|
|
|
#ifndef __CALLBACK__
|
|
|
|
#define __CALLBACK__
|
|
|
|
|
2004-09-19 05:20:32 +02:00
|
|
|
#if defined MW_COMPILER
|
2003-11-16 20:23:48 +01:00
|
|
|
/* these are no-ops for MW as I understand it */
|
|
|
|
# define CALLBACK_PROLOGUE()
|
|
|
|
# define CALLBACK_EPILOGUE()
|
2004-09-19 05:20:32 +02:00
|
|
|
|
|
|
|
#elif defined XW_TARGET_PNO || defined XW_TARGET_X86
|
|
|
|
|
|
|
|
#define CALLBACK_PROLOGUE()
|
|
|
|
#define CALLBACK_EPILOGUE()
|
|
|
|
|
2003-11-16 20:23:48 +01:00
|
|
|
#else
|
|
|
|
|
|
|
|
register void *reg_a4 asm("%a4");
|
|
|
|
|
|
|
|
#define CALLBACK_PROLOGUE() \
|
|
|
|
{ void* __save_a4 = reg_a4; asm("move.l %%a5,%%a4; sub.l #edata,%%a4" : :);
|
|
|
|
|
|
|
|
#define CALLBACK_EPILOGUE() reg_a4 = __save_a4;}
|
|
|
|
|
|
|
|
#endif /* MW_COMPILER */
|
|
|
|
|
|
|
|
#endif
|