コード例 #1
0
        private void Execute_DD_Instruction()
        {
            var secondOpcodeByte = Memory[PC++];

            if (secondOpcodeByte == 0xCB)
            {
                var offset = Memory[PC++];
                DDCB_InstructionExecutors[Memory[PC++]](offset);
            }
            else
            {
                DD_InstructionExecutors[Memory[PC++]]();
            }
        }
コード例 #2
0
        private int Execute_DD_Instruction()
        {
            Inc_R();
            var secondOpcodeByte = ProcessorAgent.PeekNextOpcode();

            if (secondOpcodeByte == 0xCB)
            {
                Inc_R();
                ProcessorAgent.FetchNextOpcode();
                var offset = ProcessorAgent.FetchNextOpcode();
                return(DDCB_InstructionExecutors[ProcessorAgent.FetchNextOpcode()](offset));
            }

            if (DD_InstructionExecutors.ContainsKey(secondOpcodeByte))
            {
                Inc_R();
                ProcessorAgent.FetchNextOpcode();
                return(DD_InstructionExecutors[secondOpcodeByte]());
            }

            return(NOP());
        }