private void MoveToNextCommand() { curCommand = null; var one = new bool[BIT_LENGTH]; one[0] = true; BitValue curCommandIndex = new BitValue(registers[RegisterName.PC].GetValue()); curCommandIndex.Add(new BitValue(one)); registers[RegisterName.PC].SetValue(new BitValue(curCommandIndex)); }
public void MakeStep() { BitValue curStep = Parent.registers[RegisterName.TC].GetValue(); if (curStep.ToInt() >= executionSteps.Count) { IsDone = true; return; } executionSteps[curStep.ToInt()].Invoke(); var one = new bool[ProcessorModel.BIT_LENGTH]; one[0] = true; curStep.Add(new BitValue(one)); Parent.registers[RegisterName.TC].SetValue(curStep); IsDone = (curStep.ToInt() >= executionSteps.Count); }