0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-08-04 10:26:31 +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,32 @@
namespace X86Disassembler.X86.Operands;
/// <summary>
/// Represents a relative offset operand in an x86 instruction (used for jumps and calls)
/// </summary>
public class RelativeOffsetOperand : Operand
{
/// <summary>
/// Gets or sets the target address
/// </summary>
public ulong TargetAddress { get; set; }
/// <summary>
/// Initializes a new instance of the RelativeOffsetOperand class
/// </summary>
/// <param name="targetAddress">The target address</param>
/// <param name="size">The size of the offset in bits (8 or 32)</param>
public RelativeOffsetOperand(ulong targetAddress, int size = 32)
{
Type = OperandType.RelativeOffset;
TargetAddress = targetAddress;
Size = size;
}
/// <summary>
/// Returns a string representation of this operand
/// </summary>
public override string ToString()
{
return $"0x{TargetAddress:X}";
}
}