Пример #1
0
 public LD(IWordRegister to, IRegisterPair from, string opcodeStr, int cycles)
 {
     _executor = () =>
     {
         to.Set(from.Get());
         Bus.CPU.Registers.PC.Increment(1);
         return(new ExecutedOpcode(cycles, opcodeStr, OpcodeType.LD));
     };
 }
Пример #2
0
 public LD(IRegisterPair to, ushort from, string opcodeStr, int cycles)
 {
     _executor = () =>
     {
         to.Set(from);
         Bus.CPU.Registers.PC.Increment(3);
         opcodeStr = opcodeStr.Replace("d16", $"0x{from:X}");
         return(new ExecutedOpcode(cycles, opcodeStr, OpcodeType.LD));
     };
 }