public void Exit(Thread thread, int operand1, int operand2) { int op = thread.IsStackEmpty ? 0 : thread.Pop(); thread.Clear(); thread.ExitCode = op; thread.EndExecution(); }