mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-05-19 20:01:17 +03:00
cleanup
This commit is contained in:
parent
3ea327064a
commit
49f1d7d221
@ -29,6 +29,6 @@ public class BaseRegisterMemoryOperand : MemoryOperand
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
var registerName = ModRMDecoder.GetRegisterName(BaseRegister, 32);
|
var registerName = ModRMDecoder.GetRegisterName(BaseRegister, 32);
|
||||||
return $"{GetSegmentPrefix()}{GetSizePrefix()}[{registerName}]";
|
return $"{GetSizePrefix()}[{registerName}]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,6 @@ public class DirectMemoryOperand : MemoryOperand
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override string ToString()
|
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):X2}"
|
||||||
: $"0x{Math.Abs(Displacement):X}";
|
: $"0x{Math.Abs(Displacement):X}";
|
||||||
|
|
||||||
return $"{GetSegmentPrefix()}{GetSizePrefix()}[{registerName}{sign}{formattedDisplacement}]";
|
return $"{GetSizePrefix()}[{registerName}{sign}{formattedDisplacement}]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,16 +21,6 @@ public abstract class MemoryOperand : Operand
|
|||||||
SegmentOverride = segmentOverride;
|
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>
|
/// <summary>
|
||||||
/// Gets the size prefix string for display (e.g., "byte ptr", "word ptr", "dword ptr")
|
/// Gets the size prefix string for display (e.g., "byte ptr", "word ptr", "dword ptr")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -60,6 +60,6 @@ public class ScaledIndexMemoryOperand : MemoryOperand
|
|||||||
dispPart = $"{sign}0x{Math.Abs(Displacement):X}";
|
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