mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-21 00:28:36 +03:00
nice big refactor
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user