/// <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; }
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++; } } }
public PreInstruction(InstructionBase instruction, IInstructionParameters parameters) { Instruction = instruction; Parameters = parameters; }