2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 /* The main purpose is to test alert address detection and stack trace */
8 #include <aros/asmcall.h>
9 #include <aros/debug.h>
10 #include <exec/alerts.h>
11 #include <exec/interrupts.h>
12 #include <proto/dos.h>
13 #include <proto/exec.h>
18 * SoftInt is the only way to simulate supervisor mode on hosted AROS.
19 * Of course there's no real privilege level difference, however interrupts
20 * in hosted AROS are running on a simulated supervisor level for internal
21 * purposes (in order to avoid nesting interrupts).
23 static AROS_INTH1(superAlert
, APTR
, interruptData
)
27 D(bug("Supervisor code called\n"));
29 Alert((IPTR
)interruptData
);
36 struct Interrupt MyInt
;
38 int main(int argc
, char **argv
)
44 for (i
= 1; i
< argc
; i
++)
46 if (!stricmp(argv
[i
], "deadend"))
48 else if (!stricmp(argv
[i
], "supervisor"))
55 D(bug("Calling supervisor alert...\n"));
57 MyInt
.is_Data
= (APTR
)n
;
58 MyInt
.is_Code
= (APTR
)superAlert
;