本文整理汇总了C#中SharpOS.AOT.X86.Assembly.SAR方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.SAR方法的具体用法?C# Assembly.SAR怎么用?C# Assembly.SAR使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpOS.AOT.X86.Assembly
的用法示例。
在下文中一共展示了Assembly.SAR方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SAR_rmreg32_imm8
public void SAR_rmreg32_imm8 ()
{
// SAR EAX, 0x6
// SAR (R32.EAX, 0x6)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SAR (R32.EAX, 0x6);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xc1, 0xf8, 0x6 };
Assert.IsTrue (CompareData (memoryStream, target), "'SAR EAX, 0x6' failed.");
}
示例2: SAR_rmreg16_imm8
public void SAR_rmreg16_imm8 ()
{
// SAR SP, 0xa
// SAR (R16.SP, 0xa)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SAR (R16.SP, 0xa);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0xc1, 0xfc, 0xa };
Assert.IsTrue (CompareData (memoryStream, target), "'SAR SP, 0xa' failed.");
}
示例3: SAR_rmreg8_imm8
public void SAR_rmreg8_imm8 ()
{
// SAR BH, 0xd
// SAR (R8.BH, 0xd)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SAR (R8.BH, 0xd);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xc0, 0xff, 0xd };
Assert.IsTrue (CompareData (memoryStream, target), "'SAR BH, 0xd' failed.");
}
示例4: SAR_mem32_imm8
public void SAR_mem32_imm8 ()
{
// SAR DWord [EAX*2 + 0x12345678], 0x8
// SAR (new DWordMemory(null, null, R32.EAX, 1, 0x12345678), 0x8)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SAR (new DWordMemory (null, null, R32.EAX, 1, 0x12345678), 0x8);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0xc1, 0xbc, 0x0, 0x78, 0x56, 0x34, 0x12, 0x8 };
Assert.IsTrue (CompareData (memoryStream, target), "'SAR DWord [EAX*2 + 0x12345678], 0x8' failed.");
}
示例5: SAR_mem16_imm8
public void SAR_mem16_imm8 ()
{
// SAR Word [GS:EDX + EBX*2], 0xf
// SAR (new WordMemory(Seg.GS, R32.EDX, R32.EBX, 1), 0xf)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SAR (new WordMemory (Seg.GS, R32.EDX, R32.EBX, 1), 0xf);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x65, 0x66, 0xc1, 0x3c, 0x5a, 0xf };
Assert.IsTrue (CompareData (memoryStream, target), "'SAR Word [GS:EDX + EBX*2], 0xf' failed.");
}
示例6: SAR_mem8_imm8
public void SAR_mem8_imm8 ()
{
// SAR Byte [SS:EAX*2], 0x4
// SAR (new ByteMemory(Seg.SS, null, R32.EAX, 1), 0x4)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SAR (new ByteMemory (Seg.SS, null, R32.EAX, 1), 0x4);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x36, 0xc0, 0x3c, 0x0, 0x4 };
Assert.IsTrue (CompareData (memoryStream, target), "'SAR Byte [SS:EAX*2], 0x4' failed.");
}