internal static ProgramInstruction Make(String instructionField, String operandField) { ProgramInstruction instruction = ProgramInstructionFactory.Make(instructionField); ReadBuffer buffer = new ReadBuffer(operandField); instruction.ReadOperand(buffer); return(instruction); }
private void CheckMake(String mnemonic, Type expectedType, String message) { try { ProgramInstruction instruction = ProgramInstructionFactory.Make(mnemonic); Assert.IsNotNull(expectedType, message); Assert.IsInstanceOfType(instruction, expectedType, message); Assert.AreEqual(mnemonic, instruction.Mnemonic, "指定のニーモニックと命令のニーモニックが同じ"); } catch (Casl2SimulatorException) { Assert.IsNull(expectedType, message); } }