mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
Updated instruction handlers to use factory methods instead of directly setting Size property
This commit is contained in:
@ -47,7 +47,7 @@ public class MovRm8Imm8Handler : InstructionHandler
|
||||
// For MOV r/m8, imm8 (0xC6):
|
||||
// - The r/m field with mod specifies the destination operand (register or memory)
|
||||
// - The immediate value is the source operand
|
||||
var (_, reg, _, destinationOperand) = ModRMDecoder.ReadModRM();
|
||||
var (_, reg, _, destinationOperand) = ModRMDecoder.ReadModRM8();
|
||||
|
||||
// MOV r/m8, imm8 only uses reg=0
|
||||
if (reg != 0)
|
||||
@ -55,8 +55,7 @@ public class MovRm8Imm8Handler : InstructionHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
// Adjust the operand size to 8-bit
|
||||
destinationOperand.Size = 8;
|
||||
// Note: The operand size is already set to 8-bit by the ReadModRM8 method
|
||||
|
||||
// Read the immediate value
|
||||
if (!Decoder.CanReadByte())
|
||||
|
Reference in New Issue
Block a user