0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 08:18:36 +03:00

fixes and removed unused code

This commit is contained in:
bird_egop
2025-04-16 19:07:32 +03:00
parent 9ddaa02471
commit 9445fb225f
15 changed files with 66 additions and 141 deletions

View File

@ -35,13 +35,10 @@ public class DisplacementMemoryOperand : MemoryOperand
/// </summary>
public override string ToString()
{
string sign = Displacement >= 0 ? "+" : "";
string sign = Displacement >= 0 ? "+" : "-";
var registerName = ModRMDecoder.GetRegisterName(BaseRegister, 32);
// Format small displacements (< 256) with at least 2 digits
string formattedDisplacement = Math.Abs(Displacement) < 256
? $"0x{Math.Abs(Displacement):X2}"
: $"0x{Math.Abs(Displacement):X}";
string formattedDisplacement = $"0x{Displacement:X2}";
return $"{GetSizePrefix()}[{registerName}{sign}{formattedDisplacement}]";
}