Skip to content

Commit e2b5ebf

Browse files
committed
e bit bug fix
1 parent bf2253f commit e2b5ebf

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/com/tomeraberbach/mano/simulation/Computer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,8 +885,6 @@ public void tick() throws IllegalStateException {
885885
.forEach(microoperations::push);
886886

887887
sc.setValue(sc.get() + 1);
888-
} else {
889-
throw new IllegalStateException("The stop or go S flip-flop of the computer must be asserted in order to run a program.");
890888
}
891889
}
892890
}

src/com/tomeraberbach/mano/simulation/Register.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void complement() {
187187
*/
188188
public void add(int value, Register e) {
189189
validate(value);
190-
e.value.setValue(this.value.get() + value > max() ? (Computer.bit(0, this.value.get() + value - max()) ? 1 : 0) : 0);
190+
e.value.setValue(this.value.get() + value > max() ? 1 : 0);
191191
this.value.setValue((this.value.get() + value) % (max() + 1));
192192
}
193193

0 commit comments

Comments
 (0)