public void execute(VirtualMachine vm) { for (int j = 0; j < i; j++) { vm.popRunStack(); } if (vm.isDumpOn()) { print(); vm.dumpRunStack(); } }
public void execute(VirtualMachine vm) { // get an integer from the user System.out.print("Please enter in an integer: "); try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String line = in.readLine(); s = Integer.parseInt(line); } catch (java.io.IOException ex) { } vm.pushRunStack(s); if (vm.isDumpOn()) { print(); vm.dumpRunStack(); } }