本文整理匯總了C#中SharpOS.AOT.X86.Assembly.BSF方法的典型用法代碼示例。如果您正苦於以下問題:C# Assembly.BSF方法的具體用法?C# Assembly.BSF怎麽用?C# Assembly.BSF使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SharpOS.AOT.X86.Assembly
的用法示例。
在下文中一共展示了Assembly.BSF方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: BSF_reg32_mem32
public void BSF_reg32_mem32 ()
{
// BSF ESI, [ES:0x12345678]
// BSF (R32.ESI, new DWordMemory(Seg.ES, null, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.BSF (R32.ESI, new DWordMemory (Seg.ES, null, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x26, 0xf, 0xbc, 0x35, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'BSF ESI, [ES:0x12345678]' failed.");
}
示例2: BSF_reg32_rmreg32
public void BSF_reg32_rmreg32 ()
{
// BSF EBX, ESI
// BSF (R32.EBX, R32.ESI)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.BSF (R32.EBX, R32.ESI);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xf, 0xbc, 0xde };
Assert.IsTrue (CompareData (memoryStream, target), "'BSF EBX, ESI' failed.");
}
示例3: BSF_reg16_mem16
public void BSF_reg16_mem16 ()
{
// BSF SI, [ESI + 0x12345678]
// BSF (R16.SI, new WordMemory(null, R32.ESI, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.BSF (R16.SI, new WordMemory (null, R32.ESI, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0xf, 0xbc, 0xb6, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'BSF SI, [ESI + 0x12345678]' failed.");
}
示例4: BSF_reg16_rmreg16
public void BSF_reg16_rmreg16 ()
{
// BSF SP, BX
// BSF (R16.SP, R16.BX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.BSF (R16.SP, R16.BX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0xf, 0xbc, 0xe3 };
Assert.IsTrue (CompareData (memoryStream, target), "'BSF SP, BX' failed.");
}