home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / CLISP-2.LHA / CLISP960530-ki.lha / ffcall / trampoline / proto.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-15  |  598 b   |  24 lines

  1. /* Sample prototype for a trampoline. */
  2.  
  3. /*
  4.  * Copyright 1995 Bruno Haible, <haible@ma2s2.mathematik.uni-karlsruhe.de>
  5.  *
  6.  * This is free software distributed under the GNU General Public Licence
  7.  * described in the file COPYING. Contact the author if you don't have this
  8.  * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
  9.  * on this software.
  10.  */
  11.  
  12. #define function  (int (*) ()) 0xbabebec0
  13. #define variable  *(void**)    0x12345678
  14. #define data      (void*)      0x73554711
  15.  
  16. int tramp ()
  17. { variable = data;
  18.   return (*function)();
  19. }
  20.  
  21. int jump ()
  22. { goto *function; }
  23.  
  24.