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

nice big refactor

This commit is contained in:
bird_egop
2025-04-13 23:06:52 +03:00
parent 59df064ca4
commit 11a2cfada4
92 changed files with 981 additions and 1509 deletions

View File

@ -36,13 +36,13 @@ public class DecRegHandler : InstructionHandler
public override bool Decode(byte opcode, Instruction instruction)
{
// Calculate the register index (0 for EAX, 1 for ECX, etc.)
byte reg = (byte)(opcode - 0x48);
RegisterIndex reg = (RegisterIndex)(opcode - 0x48);
// Set the mnemonic
instruction.Mnemonic = "dec";
// Set the operand (register name)
instruction.Operands = GetRegister32(reg);
instruction.Operands = ModRMDecoder.GetRegisterName(reg, 32);
return true;
}