0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-05-19 11:51:17 +03:00

34 lines
918 B
C#
Raw Normal View History

namespace X86Disassembler.X86;
using System.Collections.Generic;
/// <summary>
/// Represents an x86 instruction
/// </summary>
public class Instruction
{
/// <summary>
/// Gets or sets the address of the instruction
/// </summary>
2025-04-14 02:07:17 +03:00
public ulong Address { get; set; }
/// <summary>
/// Gets or sets the type of the instruction
/// </summary>
public InstructionType Type { get; set; } = InstructionType.Unknown;
/// <summary>
/// Gets or sets the structured operands of the instruction
/// </summary>
public List<Operand> StructuredOperands { get; set; } = [];
/// <summary>
/// Returns a string representation of the instruction
/// </summary>
/// <returns>A string representation of the instruction</returns>
public override string ToString()
{
return $"{Address:X8} {Type:G} {string.Join(",", StructuredOperands)}";
}
}