repo.or.cz
/
AROS.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
TaggedOpenLibrary constants off by one fix.
[AROS.git]
/
test
/
exec
/
traptest.c
blob
ffdae1bbf3bb36ee8ee8968d5737e1b7db5289c5
1
#include <stdio.h>
2
3
int
main
()
4
{
5
int
a
,
b
,
c
;
6
int
*
ptr
;
7
8
a
=
3
;
9
b
=
0
;
10
printf
(
"Attempting to divide by zero...
\n
"
);
11
c
=
a
/
b
;
12
printf
(
"Done, result is: %d!
\n
"
,
c
);
13
14
printf
(
"Trying illegal access now...
\n
"
);
15
ptr
= (
unsigned int
*)
0xABADC0DE
;
16
a
= *
ptr
;
17
printf
(
"Done, result is: %d!
\n
"
,
a
);
18
19
return
0
;
20
}