diff --git a/src/rars/riscv/syscalls/SyscallExit.java b/src/rars/riscv/syscalls/SyscallExit.java index 8927b550..0b8f7a12 100644 --- a/src/rars/riscv/syscalls/SyscallExit.java +++ b/src/rars/riscv/syscalls/SyscallExit.java @@ -1,6 +1,7 @@ package rars.riscv.syscalls; import rars.ExitingException; +import rars.Globals; import rars.ProgramStatement; import rars.riscv.AbstractSyscall; @@ -41,6 +42,7 @@ public SyscallExit() { } public void simulate(ProgramStatement statement) throws ExitingException { + Globals.exitCode = 0; throw new ExitingException(); // empty exception list. } -} \ No newline at end of file +}