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

32 lines
861 B
C#
Raw Normal View History

namespace X86Disassembler.X86.Operands;
/// <summary>
/// Represents an 8-bit register operand in an x86 instruction
/// </summary>
public class Register8Operand : Operand
{
/// <summary>
/// Gets or sets the 8-bit register
/// </summary>
public RegisterIndex8 Register { get; set; }
/// <summary>
/// Initializes a new instance of the Register8Operand class
/// </summary>
/// <param name="register">The 8-bit register</param>
public Register8Operand(RegisterIndex8 register)
{
Type = OperandType.Register;
Register = register;
Size = 8; // Always 8 bits for this operand type
}
/// <summary>
/// Returns a string representation of this operand
/// </summary>
public override string ToString()
{
2025-04-16 19:14:11 +03:00
return RegisterMapper.GetRegisterName(Register);
}
}