public RegisterA Set(IOperand operand) { if (operand is RegisterA) { return(this); //do nothing, this should be okay to support IOperands this way //throw new Exception("Attempting to set A to A"); } else if (operand is RegisterX) { CPU6502.TXA(); } else if (operand is RegisterY) { CPU6502.TYA(); } else { CPU6502.LDA(operand); } return(this); }