Skip to content

Syscall 10 (Exit) uses last code from Syscall 93 (Exit2) #170

@rladenson

Description

@rladenson

Syscall 10 (Exit) is supposed to always exit with code 0 (at least that's what it says in the documentation in RARS) however instead of this, if you have used Syscall 93 (Exit2, the one that lets you choose what code you exit with) since you opened the program, it uses the most recent exit code for that instead.

Repro:

  1. Open Rars
  2. Create a new file
  3. Make the contents of that file
addi a7, zero, 93
addi a0, zero, 1
ecall
  1. Assemble and run the file
  2. Change the file contents to
addi a7, zero, 10
ecall
  1. Assemble and run again

Expected: Should exit with code 0
Actual: Exits with code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions