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

more cleanup

This commit is contained in:
bird_egop
2025-04-15 02:42:47 +03:00
parent 49f1d7d221
commit abe4d38d4b
97 changed files with 160 additions and 219 deletions

View File

@ -35,11 +35,8 @@ public class CallRm32Handler : InstructionHandler
return false;
}
// Peek at the ModR/M byte without advancing the position
byte modRM = Decoder.PeakByte();
// Extract the reg field (bits 3-5)
byte reg = (byte)((modRM & 0x38) >> 3);
var reg = ModRMDecoder.PeakModRMReg();
// CALL r/m32 is encoded as FF /2 (reg field = 2)
return reg == 2;
@ -65,7 +62,7 @@ public class CallRm32Handler : InstructionHandler
// Read the ModR/M byte
// For CALL r/m32 (FF /2):
// - The r/m field with mod specifies the operand (register or memory)
var (mod, reg, rm, operand) = ModRMDecoder.ReadModRM();
var (_, _, _, operand) = ModRMDecoder.ReadModRM();
// Set the structured operands
// CALL has only one operand