Exit the program with the accumulator as the code on completion

This commit is contained in:
Henry 2019-12-20 16:52:41 +00:00
parent d2a3c50935
commit febdd862e8
3 changed files with 6 additions and 0 deletions

View file

@ -16,6 +16,8 @@ public class CodegenImpl implements Codegen {
}
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
+ "li a7,93\n"
+ "ecall\n"
+ builder.toString();
}

View file

@ -16,6 +16,8 @@ public class CodegenImpl implements Codegen {
}
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
+ "li a7,93\n"
+ "ecall\n"
+ builder.toString();
}

View file

@ -16,6 +16,8 @@ public class CodegenImpl implements Codegen {
}
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
+ "li a7,93\n"
+ "ecall\n"
+ builder.toString();
}