mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-05-19 03:41:18 +03:00
cleanup
This commit is contained in:
parent
3ea327064a
commit
49f1d7d221
@ -29,6 +29,6 @@ public class BaseRegisterMemoryOperand : MemoryOperand
|
||||
public override string ToString()
|
||||
{
|
||||
var registerName = ModRMDecoder.GetRegisterName(BaseRegister, 32);
|
||||
return $"{GetSegmentPrefix()}{GetSizePrefix()}[{registerName}]";
|
||||
return $"{GetSizePrefix()}[{registerName}]";
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ public class DirectMemoryOperand : MemoryOperand
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{GetSegmentPrefix()}{GetSizePrefix()}[0x{Address:X}]";
|
||||
return $"{GetSizePrefix()}[0x{Address:X}]";
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,6 @@ public class DisplacementMemoryOperand : MemoryOperand
|
||||
? $"0x{Math.Abs(Displacement):X2}"
|
||||
: $"0x{Math.Abs(Displacement):X}";
|
||||
|
||||
return $"{GetSegmentPrefix()}{GetSizePrefix()}[{registerName}{sign}{formattedDisplacement}]";
|
||||
return $"{GetSizePrefix()}[{registerName}{sign}{formattedDisplacement}]";
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,7 @@ public abstract class MemoryOperand : Operand
|
||||
Size = size;
|
||||
SegmentOverride = segmentOverride;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the segment prefix string for display
|
||||
/// </summary>
|
||||
/// <returns>The segment prefix string</returns>
|
||||
protected string GetSegmentPrefix()
|
||||
{
|
||||
// Format changed to match expected test output: "dword ptr es:[ebp+0x10]" instead of "es:dword ptr [ebp+0x10]"
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size prefix string for display (e.g., "byte ptr", "word ptr", "dword ptr")
|
||||
/// </summary>
|
||||
|
@ -60,6 +60,6 @@ public class ScaledIndexMemoryOperand : MemoryOperand
|
||||
dispPart = $"{sign}0x{Math.Abs(Displacement):X}";
|
||||
}
|
||||
|
||||
return $"{GetSegmentPrefix()}{GetSizePrefix()}[{baseRegPart}{indexPart}{dispPart}]";
|
||||
return $"{GetSizePrefix()}[{baseRegPart}{indexPart}{dispPart}]";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user