Fixed a bug in Am2900; created dlatch8/80; relayouted some components
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / mi / StandardMicroInstruction.java
index a151042..c565432 100644 (file)
@@ -4,10 +4,12 @@ import net.mograsim.machine.mi.parameters.MicroInstructionParameter;
 
 class StandardMicroInstruction implements MicroInstruction
 {
+       private final Runnable updateCallback;
        private MicroInstructionParameter[] parameters;
 
-       StandardMicroInstruction(MicroInstructionParameter... parameters)
+       StandardMicroInstruction(Runnable updateCallback, MicroInstructionParameter... parameters)
        {
+               this.updateCallback = updateCallback;
                this.parameters = parameters;
        }
 
@@ -33,6 +35,7 @@ class StandardMicroInstruction implements MicroInstruction
        public void setParameter(int index, MicroInstructionParameter param)
        {
                parameters[index] = param;
+               updateCallback.run();
        }
 
 }