Пример #1
0
        private void Execute_FD_Instruction()
        {
            var secondOpcodeByte = Memory[PC++];

            if (secondOpcodeByte == 0xCB)
            {
                var offset = Memory[PC++];
                FDCB_InstructionExecutors[Memory[PC++]](offset);
            }
            else
            {
                FD_InstructionExecutors[Memory[PC++]]();
            }
        }
Пример #2
0
        private int Execute_FD_Instruction()
        {
            Inc_R();
            var secondOpcodeByte = ProcessorAgent.PeekNextOpcode();

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

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

            return(NOP());
        }