namespace X86Disassembler.X86.Operands; /// /// Represents a direct memory operand in an x86 instruction (e.g., [0x12345678]) /// public class DirectMemoryOperand : MemoryOperand { /// /// Gets or sets the memory address /// public long Address { get; set; } /// /// Initializes a new instance of the DirectMemoryOperand class /// /// The memory address /// The size of the memory access in bits /// Optional segment override public DirectMemoryOperand(long address, int size = 32, string? segmentOverride = null) : base(size, segmentOverride) { Type = OperandType.MemoryDirect; Address = address; } /// /// Returns a string representation of this operand /// public override string ToString() { return $"{GetSegmentPrefix()}{GetSizePrefix()}[0x{Address:X}]"; } }