public void CMOVLE_reg32_rmreg32 () { // CMOVLE ESP, EAX // CMOVLE (R32.ESP, R32.EAX) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.CMOVLE (R32.ESP, R32.EAX); asm.Encode (memoryStream); byte [] target = new byte [] { 0xf, 0x4e, 0xe0 }; Assert.IsTrue (CompareData (memoryStream, target), "'CMOVLE ESP, EAX' failed."); }
public void CMOVLE_reg32_mem32 () { // CMOVLE EDX, [EBP + 0x12345678] // CMOVLE (R32.EDX, new DWordMemory(null, R32.EBP, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.CMOVLE (R32.EDX, new DWordMemory (null, R32.EBP, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0xf, 0x4e, 0x95, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'CMOVLE EDX, [EBP + 0x12345678]' failed."); }
public void CMOVLE_reg16_rmreg16 () { // CMOVLE CX, BP // CMOVLE (R16.CX, R16.BP) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.CMOVLE (R16.CX, R16.BP); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0x4e, 0xcd }; Assert.IsTrue (CompareData (memoryStream, target), "'CMOVLE CX, BP' failed."); }
public void CMOVLE_reg16_mem16 () { // CMOVLE AX, [DS:0x12345678] // CMOVLE (R16.AX, new WordMemory(Seg.DS, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.CMOVLE (R16.AX, new WordMemory (Seg.DS, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x3e, 0x66, 0xf, 0x4e, 0x5, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'CMOVLE AX, [DS:0x12345678]' failed."); }