예제 #1
0
 public void Run(uint instructions = uint.MaxValue)
 {
     for (uint i = 0; i < instructions && !State.Terminated; i++)
     {
         var inst = dec.Decode(State.ReadInstruction());
         intr.Execute(State, inst);
         State.StepPC();
     }
 }
예제 #2
0
        private bool Step()
        {
            bool BreakIf = BreakPoints.Contains(State.PC);

            if (BreakIf && LastBreak != State.PC)
            {
                LastBreak = State.PC;
                return(true);
            }

            IR = dec.Decode(State.ReadInstruction());
            if (BreakOnJump && IR.IsControlFlow())
            {
                BreakOnJump = false;
                return(true);
            }
            intr.Execute(State, IR);
            State.StepPC();
            return(false);
        }