Ejemplo n.º 1
0
        public Instruction(long[] memory, long instructionPointer, long relativeBase)
        {
            Instr = memory[instructionPointer].ToString("D5");

            InstructionPointer = instructionPointer;
            Memory             = memory;
            OpCode             = (OpCode)Instr.GetPart(3, 2);
            FirstMode          = (ParamMode)Instr.GetPart(2, 1);
            SecondMode         = (ParamMode)Instr.GetPart(1, 1);
            ThirdMode          = (ParamMode)Instr.GetPart(0, 1);
            RelativeBase       = relativeBase;
        }