private void RunAllInstructions() throws IOException {
    int PClimit = Register.getPC() + this.AllInstructions.size() * 4;
    int startPC = Instruction.startAddressOfInst;

    while (true) {
      Register var10000 = this.Reg;
      int currentPC = Register.getPC();
      if (currentPC >= PClimit) {
        break;
      }

      int index = (currentPC - startPC) / 4;
      Instruction instr = (Instruction) this.AllInstructions.get(index);
      Error err = instr.runSingleInstruction();
      if (!err.isOk()) {
        err.printErrorMsg();
        break;
      }
    }
  }
  public Error runCurrentInstruction() {
    Error err = new Error();
    Register var10000 = this.Reg;
    int currentPC = Register.getPC();
    int startPC = Instruction.startAddressOfInst;
    int index = (currentPC - startPC) / 4;
    if (index < this.AllInstructions.size()) {
      Instruction instr = (Instruction) this.AllInstructions.get(index);
      err = instr.runSingleInstruction();
    }

    return err;
  }