Пример #1
0
        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);
 }