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

Added tests for previously untested DataTransferHandler methods and fixed NOP instruction handling

This commit is contained in:
bird_egop
2025-04-12 22:05:51 +03:00
parent 759d28f9a7
commit d5bcd56774
3 changed files with 117 additions and 1 deletions

View File

@ -316,6 +316,14 @@ public class DataTransferHandler : InstructionHandler
/// </summary>
private bool DecodeXCHGEAXReg(byte opcode, Instruction instruction)
{
// Special case for NOP (XCHG EAX, EAX)
if (opcode == 0x90)
{
instruction.Mnemonic = "nop";
instruction.Operands = "";
return true;
}
// Register is encoded in the low 3 bits of the opcode
int reg = opcode & 0x07;
string regName = ModRMDecoder.GetRegisterName(reg, 32);