Example #1
0
        internal static ProgramInstruction Make(String instructionField, String operandField)
        {
            ProgramInstruction instruction = ProgramInstructionFactory.Make(instructionField);
            ReadBuffer         buffer      = new ReadBuffer(operandField);

            instruction.ReadOperand(buffer);
            return(instruction);
        }
Example #2
0
        internal static void CheckReadOperand(
            ProgramInstruction target, String text, Boolean success, String message)
        {
            ReadBuffer buffer = new ReadBuffer(text);

            try
            {
                target.ReadOperand(buffer);
                Assert.IsTrue(success, message);
            }
            catch (Casl2SimulatorException)
            {
                Assert.IsFalse(success, message);
            }
        }