namespace X86Disassembler.X86.Operands;
///
/// Represents an immediate value operand in an x86 instruction
///
public class ImmediateOperand : Operand
{
///
/// Gets or sets the immediate value
///
public long Value { get; set; }
///
/// Initializes a new instance of the ImmediateOperand class
///
/// The immediate value
/// The size of the value in bits
public ImmediateOperand(long value, int size = 32)
{
Type = OperandType.ImmediateValue;
Value = value;
Size = size;
}
///
/// Returns a string representation of this operand
///
public override string ToString()
{
return $"0x{Value:X}";
}
}