Example #1
0
        public static int LD_IY_nn_mem(IZ80CPU cpu, byte[] instruction)
        {
            var nn = Utilities.LETo16Bit(instruction[2], instruction[3]);

            cpu.Registers.IY = cpu.ReadWord(nn);
            return(20);
        }
Example #2
0
        public static int LD_HL_nn_mem(IZ80CPU cpu, byte[] instruction)
        {
            var nn = Utilities.LETo16Bit(instruction[1], instruction[2]);

            cpu.Registers.HL = cpu.ReadWord(nn);

            return(16);
        }
Example #3
0
        public static int LD_dd_nn_mem(IZ80CPU cpu, byte[] instruction)
        {
            var dst  = instruction[1].ExtractBits(4, 2);
            var nn   = Utilities.LETo16Bit(instruction[2], instruction[3]);
            var word = cpu.ReadWord(nn);

            WriteWordToCpuRegister_BC_DE_HL_SP(cpu, dst, word);

            return(20);
        }