本文整理汇总了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.");
}