new handlers and test fixes

This commit is contained in:
bird_egop
2025-04-16 20:54:08 +03:00
parent f654f64c71
commit 800915b534
20 changed files with 342 additions and 117 deletions
@@ -38,7 +38,7 @@ public class MovRegImm8Handler : InstructionHandler
instruction.Type = InstructionType.Mov;
// Register is encoded in the low 3 bits of the opcode
RegisterIndex reg = (RegisterIndex)(opcode & 0x07);
RegisterIndex8 reg = (RegisterIndex8)(opcode & 0x07);
// Read the immediate value
if (!Decoder.CanReadByte())
@@ -49,7 +49,7 @@ public class MovRegImm8Handler : InstructionHandler
byte imm8 = Decoder.ReadByte();
// Create the destination register operand
var destinationOperand = OperandFactory.CreateRegisterOperand(reg, 8);
var destinationOperand = OperandFactory.CreateRegisterOperand8(reg);
// Create the source immediate operand
var sourceOperand = OperandFactory.CreateImmediateOperand(imm8, 8);