/** * Sets the program counter to the next instruction to be executed * * @param programCounter The line of the next instruction */ private void setProgramCounter(int programCounter) { this.programCounter = programCounter; for (StackMachineListener l : listeners) l.programCounterChanged(programCounter); }