Skip to content

Commit

Permalink
Fix instruction status label
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajdin Becirovic committed May 25, 2022
1 parent 9dead1b commit 4f52748
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Binary file modified out/production/MIC-1-Simulator/sample/Controller.class
Binary file not shown.
Binary file modified out/production/MIC-1-Simulator/sample/Main.class
Binary file not shown.
8 changes: 6 additions & 2 deletions src/sample/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,16 @@ private void initializeMPCField() {
microCodeLinesLengths[newVal.intValue()][0], microCodeLinesLengths[newVal.intValue()][1]);
if (newVal.intValue() <= 2) {
instructionStatusLabel.textProperty().bind(resourceFactory.getStringBinding("instr-fetch"));
}
if (newVal.intValue() >= 3) {
} else if (newVal.intValue() == 3) {
instructionStatusLabel.textProperty().unbind();
instructionStatusLabel.
setText(resourceFactory.getResources().getString("instr-exec") + ": " +
instructionParser.getInstructionString((short) cpu.MBRProperty().get()));
} else {
instructionStatusLabel.textProperty().unbind();
instructionStatusLabel.
setText(resourceFactory.getResources().getString("instr-exec") + ": " +
instructionParser.getInstructionString(cpu.getRegisters().get(3).getValue()));
}
});
}
Expand Down

0 comments on commit 4f52748

Please sign in to comment.