public void LFS_reg32_mem () { // LFS ECX, [GS:EBX*1 + 0x12345678] // LFS (R32.ECX, new DWordMemory(Seg.GS, null, R32.EBX, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.LFS (R32.ECX, new DWordMemory (Seg.GS, null, R32.EBX, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x65, 0xf, 0xb4, 0x8b, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'LFS ECX, [GS:EBX*1 + 0x12345678]' failed."); }
public void LFS_reg16_mem () { // LFS DI, [0x12345678] // LFS (R16.DI, new DWordMemory(null, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.LFS (R16.DI, new DWordMemory (null, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0xb4, 0x3d, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'LFS DI, [0x12345678]' failed."); }