Exemplo n.º 1
0
        private int Execute_ED_Instruction()
        {
            Inc_R();
            Inc_R();
            var secondOpcodeByte = ProcessorAgent.FetchNextOpcode();

            if (IsUnsupportedInstruction(secondOpcodeByte))
            {
                return(ExecuteUnsopported_ED_Instruction(secondOpcodeByte));
            }
            else if (secondOpcodeByte >= 0xA0)
            {
                return(ED_Block_InstructionExecutors[secondOpcodeByte - 0xA0]());
            }
            else
            {
                return(ED_InstructionExecutors[secondOpcodeByte - 0x40]());
            }
        }
Exemplo n.º 2
0
        public void Execute(byte firstOpcodeByte)
        {
            switch (firstOpcodeByte)
            {
            case 0xCB:
                CB_InstructionExecutors[Memory[PC++]]();
                break;

            case 0xED:
                ED_InstructionExecutors[Memory[PC++]]();
                break;

            case 0xDD:
                Execute_DD_Instruction();
                break;

            case 0xFD:
                Execute_FD_Instruction();
                break;
            }
            SingleByte_InstructionExecutors[firstOpcodeByte]();
        }