0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 16:18:37 +03:00

Updated instruction handlers to use Type and StructuredOperands instead of Mnemonic and Operands

This commit is contained in:
bird_egop
2025-04-14 22:08:50 +03:00
parent c516e063e7
commit 685eeda03d
136 changed files with 3694 additions and 2584 deletions

View File

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