namespace X86Disassembler.X86.Operands; /// /// Represents a register operand in an x86 instruction /// public class RegisterOperand : Operand { /// /// Gets or sets the register /// public RegisterIndex Register { get; set; } /// /// Initializes a new instance of the RegisterOperand class /// /// The register /// The size of the register in bits public RegisterOperand(RegisterIndex register, int size = 32) { Type = OperandType.Register; Register = register; Size = size; } /// /// Returns a string representation of this operand /// public override string ToString() { return ModRMDecoder.GetRegisterName(Register, Size); } }