mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
Unified ADC accumulator handlers into a single handler
This commit is contained in:
@ -46,7 +46,7 @@ public class XorAlImmHandler : InstructionHandler
|
||||
byte imm8 = Decoder.ReadByte();
|
||||
|
||||
// Create the register operand for AL
|
||||
var alOperand = OperandFactory.CreateRegisterOperand(RegisterIndex.A, 8);
|
||||
var alOperand = OperandFactory.CreateRegisterOperand8(RegisterIndex8.AL);
|
||||
|
||||
// Create the immediate operand
|
||||
var immOperand = OperandFactory.CreateImmediateOperand(imm8, 8);
|
||||
|
@ -23,7 +23,9 @@ public class XorMemRegHandler : InstructionHandler
|
||||
/// <returns>True if this handler can decode the opcode</returns>
|
||||
public override bool CanHandle(byte opcode)
|
||||
{
|
||||
return opcode == 0x31;
|
||||
// Only handle opcode 0x31 when the operand size prefix is NOT present
|
||||
// This ensures 16-bit handlers get priority when the prefix is present
|
||||
return opcode == 0x31 && !Decoder.HasOperandSizePrefix();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -25,7 +25,9 @@ public class XorRegMemHandler : InstructionHandler
|
||||
/// <returns>True if this handler can decode the opcode</returns>
|
||||
public override bool CanHandle(byte opcode)
|
||||
{
|
||||
return opcode == 0x33;
|
||||
// Only handle opcode 0x33 when the operand size prefix is NOT present
|
||||
// This ensures 16-bit handlers get priority when the prefix is present
|
||||
return opcode == 0x33 && !Decoder.HasOperandSizePrefix();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user