2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
7 #include <exec/types.h>
8 #include <proto/exec.h>
10 #include <proto/kernel.h>
61 int __nocommandline
= 1;
65 APTR KernelBase
= OpenResource("kernel.resource");
66 struct Task
*me
= FindTask(NULL
);
69 Printf("GetCC() : %04lx\n",GetCC());
70 Printf("SetSR() : %08lx\n",SetSR(0,0));
73 Printf("KrnIsSuper() : %d\n", KrnIsSuper());
75 Printf("Task stack : 0x%p - 0x%p\n", me
->tc_SPLower
, me
->tc_SPUpper
);
76 Printf("Supervisor stack : 0x%p - 0x%p\n", SysBase
->SysStkLower
, SysBase
->SysStkUpper
);
81 bug("Entered SuperState...\n");
89 issuper
= KrnIsSuper();
91 bug("Leaving SuperState...\n");
95 Printf("Supervisor mode test: %d\n", issuper
);
97 Printf("Saved stack : 0x%p\n", ssp
);
99 Printf("Supervisor flags : 0x%p\n", ar
);
103 Printf("!!! SuperState() failed to enter supervisor mode (returned NULL) !!!\n");
106 Printf("User flags : 0x%p\n", a());
107 Printf("Supervisor stack : 0x%p\n", Supervisor(b
));