Пример #1
0
        public bool Step()
        {
            char[] stepCommand   = VirtualMemory.GetValue(GetICRegisterValue());
            char[] nextCommand   = VirtualMemory.GetValue(GetICRegisterValue() + 1);
            string stringCommand = new string(stepCommand);
            string stringNext    = new string(nextCommand);

            Console.WriteLine("STEP: " + stringCommand + " (NEXT: " + stringNext + ")");
            bool commandResult = CommandInterpretator.ParseCommand(stepCommand);

            if (Test())
            {
                if (!Interrupt())
                {
                    FileManager.CloseAll(); return(false);
                }
            }

            if (ChangedIC)
            {
                ChangedIC = false;
            }
            else
            {
                IncICRegisterValue(1);
            }

            if (UseMaxStep && CurrentStep++ >= Utility.MAX_STEPS)
            {
                return(StopProgram());
            }

            return(commandResult);
        }
Пример #2
0
 private char GetCurrentCommandSecondLastArgumentChar()
 {
     char[] command = VirtualMemory.GetValue(Processor.GetICRegisterValue());
     return(command[2]);
 }
Пример #3
0
 private int GetCurrentCommandSecondLastArgument()
 {
     char[] command = VirtualMemory.GetValue(Processor.GetICRegisterValue());
     return(command[2].ToString().HexToInt());
 }
Пример #4
0
 private int[] GetCurrentCommandLastTwoArguments()
 {
     char[] command = VirtualMemory.GetValue(Processor.GetICRegisterValue());
     return(new int[] { command[2].ToString().HexToInt(), command[3].ToString().HexToInt() });
 }