예제 #1
0
 /// <summary>
 /// Creates an instance of this class that represents a (potentially) executable instruction. Note that the instruction does not
 /// necessarily have to be executable by MIX; it can also concern a loader instruction, for instance. In addition, the instruction
 /// may be invalid.
 /// </summary>
 public ParsedSourceLine(int lineNumber, string locationField, string opField, string addressField, string comment, InstructionBase instruction, IInstructionParameters parameters)
     : base(instruction, parameters)
 {
     LineNumber    = lineNumber;
     LocationField = locationField;
     OpField       = opField;
     AddressField  = addressField;
     Comment       = comment;
 }
예제 #2
0
파일: Parser.cs 프로젝트: arlm/MixEmul
        static void GetMixOrLoaderInstructionAndParameters(string opField, string addressField, ParsingStatus status, out InstructionBase instruction, out IInstructionParameters instructionParameters)
        {
            status.LineSection    = LineSection.AddressField;
            instructionParameters = null;

            instruction = mLoaderInstructions[opField];

            if (instruction != null)
            {
                instructionParameters = LoaderInstructionParameters.ParseAddressField(instruction, addressField, status);
            }
            else
            {
                instruction = mInstructionSet[opField];

                if (instruction != null)
                {
                    instructionParameters = MixInstructionParameters.ParseAddressField(instruction, addressField, status);
                    status.LocationCounter++;
                }
            }
        }
예제 #3
0
 public PreInstruction(InstructionBase instruction, IInstructionParameters parameters)
 {
     Instruction = instruction;
     Parameters  = parameters;
 }