コード例 #1
0
ファイル: JSR.cs プロジェクト: dseller/NESCove
        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);
        }
コード例 #2
0
 public override int Execute(C6502 cpu, byte operand)
 {
     cpu.Push(cpu.State.ProcessorStatus);
     return(3);
 }
コード例 #3
0
 public override int Execute(C6502 cpu, byte operand)
 {
     cpu.Push(cpu.State.RegA);
     return(3);
 }