public static void Restore(Register registers = Register.All, bool statusFlags = false) { if (registers.HasFlag(Register.Y)) { CPU6502.PLA(); Y.Set(A); Y.State.Pop(); } if (registers.HasFlag(Register.X)) { CPU6502.PLA(); X.Set(A); X.State.Pop(); } if (registers.HasFlag(Register.A)) { CPU6502.PLA(); A.State.Pop(); } if (statusFlags) { CPU6502.PLP(); } }