Пример #1
0
 public int Execute(CpuState cpuState, IMemory memory)
 {
     var ret = cpuState.Pc + 2;
     cpuState.PushStack((byte)((ret & 0xFF00) >> 8), memory);
     cpuState.PushStack((byte) (ret & 0xFF), memory);
     cpuState.Pc = memory.ReadShort(cpuState.Pc + 1);
     return 6;
 }
Пример #2
0
 protected override void InternalExecute(CpuState cpuState, IMemory memory, byte arg, Action<byte> write, ref int cycles)
 {
     cpuState.PushStack(cpuState.A, memory);
     cycles = 3;
 }
Пример #3
0
 protected override void InternalExecute(CpuState cpuState, IMemory memory, byte arg, Action<byte> write, ref int cycles)
 {
     // Break flag is always set
     cpuState.PushStack((byte) (cpuState.StatusRegister | (byte)CpuState.Flags.Break), memory);
     cycles = 3;
 }