Exemplo n.º 1
0
        public override int Execute(C6502 cpu, byte operand)
        {
            cpu.State.ProcessorStatus = cpu.Pop();
            byte b1 = cpu.Pop();
            byte b2 = cpu.Pop();

            cpu.State.ProgramCounter = (ushort)((b2 << 8) | b1);
            return(6);
        }
Exemplo n.º 2
0
        public override int Execute(C6502 cpu, byte operand)
        {
            byte b1 = cpu.Pop();
            byte b2 = cpu.Pop();

            // low byte first, b1 is low byte
            ushort address = (ushort)((b2 << 8) | b1);

            cpu.State.ProgramCounter = (ushort)(address + 1);

            return(6);
        }
Exemplo n.º 3
0
 public override int Execute(C6502 cpu, byte operand)
 {
     cpu.State.RegA = cpu.Pop();
     SetNegative(cpu, () => Helper.IsSigned(cpu.State.RegA));
     SetZero(cpu, () => cpu.State.RegA == 0);
     return(4);
 }
Exemplo n.º 4
0
 public override int Execute(C6502 cpu, byte operand)
 {
     cpu.State.ProcessorStatus = cpu.Pop();
     return(4);
 }