public override int Execute(C6502 cpu, byte operand) { var state = cpu.State as ExecutionState; ushort toPush = (ushort)(cpu.State.ProgramCounter - 1); // TODO: check if this is the correct order. I guess so (DS) cpu.Push((byte)((toPush >> 8) & 0xFF)); cpu.Push((byte)(toPush & 0xFF)); cpu.State.ProgramCounter = AddressingType.GetAddress(cpu, state.Parameter); return(6); }
public override int Execute(C6502 cpu, byte operand) { cpu.Push(cpu.State.ProcessorStatus); return(3); }
public override int Execute(C6502 cpu, byte operand) { cpu.Push(cpu.State.RegA); return(3); }