jos/user/divzero.c

14 lines
173 B
C
Raw Normal View History

2018-09-25 09:22:51 -07:00
// buggy program - causes a divide by zero exception
#include <inc/lib.h>
int zero;
void
umain(int argc, char **argv)
{
zero = 0;
cprintf("1/0 is %08x!\n", 1/zero);
}