add casts to zune macros to silence some warnings
[tangerine.git] / test / supertest.c
blob197ce6ec4a58a4cfa3addac8f3c9259fecf2c2e4
1 /*
2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <exec/types.h>
8 #include <clib/exec_protos.h>
9 #include <stdio.h>
11 #ifdef __GNUC__
12 asm("
13 .globl _a
14 _a:
15 movew sr,d0
16 rts
17 .globl _b
18 _b:
19 movew sp@,d0
20 rte
21 ");
22 #endif
24 extern UWORD a(void);
25 extern UWORD b(void);
27 int main(void)
29 APTR ssp;
30 UWORD ar;
31 printf("%04x\n",GetCC());
32 printf("%04lx\n",SetSR(0,0));
33 ssp=SuperState();
34 ar=a();
35 UserState(ssp);
36 printf("%04x\n",a());
37 printf("%04x\n",(UWORD)Supervisor((ULONG_FUNC)&b));
38 return 0;