Add user/div0.

This commit is contained in:
Alexander Myltsev 2022-12-14 17:02:15 +03:00
parent a6598886f0
commit c3992d8db5
2 changed files with 7 additions and 2 deletions

View File

@ -47,8 +47,8 @@ debug-nox: image.bin
-ex "break _start" \ -ex "break _start" \
-ex "continue" -ex "continue"
fs.img: kernel.bin tools/mkfs user/false user/greet fs.img: kernel.bin tools/mkfs user/false user/greet user/div0
tools/mkfs $@ $< user/false user/greet tools/mkfs $@ $< user/false user/greet user/div0
LDFLAGS=-m elf_i386 LDFLAGS=-m elf_i386

5
user/div0.c Normal file
View File

@ -0,0 +1,5 @@
int main(void) {
volatile int x = 1, y = 0;
x /= y;
return 0;
}