public void LGS_reg32_mem () { // LGS EBX, [EBX + 0x12345678] // LGS (R32.EBX, new DWordMemory(null, R32.EBX, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.LGS (R32.EBX, new DWordMemory (null, R32.EBX, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0xf, 0xb5, 0x9b, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'LGS EBX, [EBX + 0x12345678]' failed."); }
public void LGS_reg16_mem () { // LGS DI, [FS:0x12345678] // LGS (R16.DI, new DWordMemory(Seg.FS, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.LGS (R16.DI, new DWordMemory (Seg.FS, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x64, 0x66, 0xf, 0xb5, 0x3d, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'LGS DI, [FS:0x12345678]' failed."); }