home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / test / supertest.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-24  |  731 b   |  45 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: supertest.c,v 1.2 1996/08/01 17:41:40 digulla Exp $
  4.     $Log: supertest.c,v $
  5.     Revision 1.2  1996/08/01 17:41:40  digulla
  6.     Added standard header for all files
  7.  
  8.     Desc:
  9.     Lang:
  10. */
  11. #include <exec/types.h>
  12. #include <clib/exec_protos.h>
  13. #include <stdio.h>
  14.  
  15. #ifdef __GNUC__
  16. asm("
  17.     .globl    _a
  18. _a:
  19.     movew    sr,d0
  20.     rts
  21.     .globl    _b
  22. _b:
  23.     movew    sp@,d0
  24.     rte
  25. ");
  26. #endif
  27.  
  28. extern UWORD a(void);
  29. extern UWORD b(void);
  30.  
  31. int main(void)
  32. {
  33.     APTR ssp;
  34.     UWORD ar;
  35.     printf("%04x\n",GetCC());
  36.     printf("%04lx\n",SetSR(0,0));
  37.     ssp=SuperState();
  38.     ar=a();
  39.     UserState(ssp);
  40.     printf("%04x\n",a());
  41.     printf("%04x\n",(UWORD)Supervisor((ULONG_FUNC)&b));
  42.     return 0;
  43. }
  44.  
  45.