//
//	fix up A5 register for callbacks to work in GNU C/C++.  If 
//	We're *not* using the GNU compiler, this is unnecessary ...
//
//	Stolen shamelessly from "Palm Programming" by Neil Rhodes
//	and Julie McKeehan.  It's a great book; run, do not walk,
//	to a suitable bookstore and buy a copy if you are at all 
//	interested in Palm programming.
//

//
//	$Header: /usr/home/pilot/gypsy-1.6/RCS/callback.h,v 1.3 1999/04/27 08:08:38 paul Exp $
//
//	$Log: callback.h,v $
//


#if defined __GNUC__
   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;
#else // not using __GNUC__
#  define CALLBACK_PROLOGUE
#  define CALLBACK_EPILOGUE
#endif
