1 /* The main purpose is to test alert address detection and stack trace */
3 #include <aros/asmcall.h>
4 #include <aros/debug.h>
5 #include <exec/alerts.h>
6 #include <exec/interrupts.h>
8 #include <proto/exec.h>
13 * SoftInt is the only way to simulate supervisor mode on hosted AROS.
14 * Of course there's no real privilege level difference, however interrupts
15 * in hosted AROS are running on a simulated supervisor level for internal
16 * purposes (in order to avoid nesting interrupts).
18 AROS_UFH3(void, superAlert
,
19 AROS_UFHA(APTR
, interruptData
, A1
),
20 AROS_UFHA(APTR
, interruptCode
, A5
),
21 AROS_UFHA(struct ExecBase
*, SysBase
, A6
))
25 D(bug("Supervisor code called\n"));
27 Alert((IPTR
)interruptData
);
32 struct Interrupt MyInt
;
34 int main(int argc
, char **argv
)
40 for (i
= 1; i
< argc
; i
++)
42 if (!stricmp(argv
[i
], "deadend"))
44 else if (!stricmp(argv
[i
], "supervisor"))
51 D(bug("Calling supervisor alert...\n"));
53 MyInt
.is_Data
= (APTR
)n
;
54 MyInt
.is_Code
= superAlert
;