本文整理匯總了C#中SharpOS.AOT.X86.Assembly.SHR方法的典型用法代碼示例。如果您正苦於以下問題:C# Assembly.SHR方法的具體用法?C# Assembly.SHR怎麽用?C# Assembly.SHR使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SharpOS.AOT.X86.Assembly
的用法示例。
在下文中一共展示了Assembly.SHR方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SHR_rmreg32_imm8
public void SHR_rmreg32_imm8 ()
{
// SHR ESP, 0x0
// SHR (R32.ESP, 0x0)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SHR (R32.ESP, 0x0);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xc1, 0xec, 0x0 };
Assert.IsTrue (CompareData (memoryStream, target), "'SHR ESP, 0x0' failed.");
}
示例2: SHR_rmreg16_imm8
public void SHR_rmreg16_imm8 ()
{
// SHR BX, 0x1
// SHR (R16.BX, 0x1)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SHR (R16.BX, 0x1);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0xd1, 0xeb };
Assert.IsTrue (CompareData (memoryStream, target), "'SHR BX, 0x1' failed.");
}
示例3: SHR_rmreg8_imm8
public void SHR_rmreg8_imm8 ()
{
// SHR BH, 0x6
// SHR (R8.BH, 0x6)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SHR (R8.BH, 0x6);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xc0, 0xef, 0x6 };
Assert.IsTrue (CompareData (memoryStream, target), "'SHR BH, 0x6' failed.");
}
示例4: SHR_mem32_imm8
public void SHR_mem32_imm8 ()
{
// SHR DWord [EDI + EDX*4 + 0x12345678], 0x2
// SHR (new DWordMemory(null, R32.EDI, R32.EDX, 2, 0x12345678), 0x2)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SHR (new DWordMemory (null, R32.EDI, R32.EDX, 2, 0x12345678), 0x2);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xc1, 0xac, 0x97, 0x78, 0x56, 0x34, 0x12, 0x2 };
Assert.IsTrue (CompareData (memoryStream, target), "'SHR DWord [EDI + EDX*4 + 0x12345678], 0x2' failed.");
}
示例5: SHR_mem16_imm8
public void SHR_mem16_imm8 ()
{
// SHR Word [ESI], 0x0
// SHR (new WordMemory(null, R32.ESI, null, 0), 0x0)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SHR (new WordMemory (null, R32.ESI, null, 0), 0x0);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0xc1, 0x2e, 0x0 };
Assert.IsTrue (CompareData (memoryStream, target), "'SHR Word [ESI], 0x0' failed.");
}
示例6: SHR_mem8_imm8
public void SHR_mem8_imm8 ()
{
// SHR Byte [EDI*8 + 0x12345678], 0x8
// SHR (new ByteMemory(null, null, R32.EDI, 3, 0x12345678), 0x8)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SHR (new ByteMemory (null, null, R32.EDI, 3, 0x12345678), 0x8);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xc0, 0x2c, 0xfd, 0x78, 0x56, 0x34, 0x12, 0x8 };
Assert.IsTrue (CompareData (memoryStream, target), "'SHR Byte [EDI*8 + 0x12345678], 0x8' failed.");
}