本文整理汇总了C#中SharpOS.AOT.X86.Assembly.AND方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.AND方法的具体用法?C# Assembly.AND怎么用?C# Assembly.AND使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpOS.AOT.X86.Assembly
的用法示例。
在下文中一共展示了Assembly.AND方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AND_rmreg32_imm32
public void AND_rmreg32_imm32 ()
{
// AND EBP, 0x3a93244
// AND (R32.EBP, 0x3a93244)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R32.EBP, 0x3a93244);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x81, 0xe5, 0x44, 0x32, 0xa9, 0x3 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND EBP, 0x3a93244' failed.");
}
示例2: AND_rmreg8_imm8
public void AND_rmreg8_imm8 ()
{
// AND CH, 0x8
// AND (R8.CH, 0x8)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R8.CH, 0x8);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x80, 0xe5, 0x8 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND CH, 0x8' failed.");
}
示例3: AND_rmreg16_imm16
public void AND_rmreg16_imm16 ()
{
// AND BP, 0x216
// AND (R16.BP, 0x216)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R16.BP, 0x216);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x81, 0xe5, 0x16, 0x2 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND BP, 0x216' failed.");
}
示例4: AND_rmreg16_reg16
public void AND_rmreg16_reg16 ()
{
// AND SP, DX
// AND (R16.SP, R16.DX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R16.SP, R16.DX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x21, 0xd4 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND SP, DX' failed.");
}
示例5: AND_rmreg32_reg32
public void AND_rmreg32_reg32 ()
{
// AND EAX, EAX
// AND (R32.EAX, R32.EAX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R32.EAX, R32.EAX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x21, 0xc0 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND EAX, EAX' failed.");
}
示例6: AND_mem16_reg16
public void AND_mem16_reg16 ()
{
// AND [EBX + ESI*4 + 0x12345678], AX
// AND (new WordMemory(null, R32.EBX, R32.ESI, 2, 0x12345678), R16.AX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (new WordMemory (null, R32.EBX, R32.ESI, 2, 0x12345678), R16.AX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x21, 0x84, 0xb3, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND [EBX + ESI*4 + 0x12345678], AX' failed.");
}
示例7: AND_rmreg8_reg8
public void AND_rmreg8_reg8 ()
{
// AND CH, CH
// AND (R8.CH, R8.CH)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R8.CH, R8.CH);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x20, 0xed };
Assert.IsTrue (CompareData (memoryStream, target), "'AND CH, CH' failed.");
}
示例8: AND_mem16_imm16
public void AND_mem16_imm16 ()
{
// AND Word [EDX], 0x72e
// AND (new WordMemory(null, R32.EDX, null, 0), 0x72e)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (new WordMemory (null, R32.EDX, null, 0), 0x72e);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x81, 0x22, 0x2e, 0x7 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND Word [EDX], 0x72e' failed.");
}
示例9: AND_mem32_imm32
public void AND_mem32_imm32 ()
{
// AND DWord [CS:0x12345678], 0x53735c3
// AND (new DWordMemory(Seg.CS, null, null, 0, 0x12345678), 0x53735c3)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (new DWordMemory (Seg.CS, null, null, 0, 0x12345678), 0x53735c3);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x2e, 0x81, 0x25, 0x78, 0x56, 0x34, 0x12, 0xc3, 0x35, 0x37, 0x5 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND DWord [CS:0x12345678], 0x53735c3' failed.");
}
示例10: AND_reg32_mem32
public void AND_reg32_mem32 ()
{
// AND EDX, [CS:0x12345678]
// AND (R32.EDX, new DWordMemory(Seg.CS, null, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R32.EDX, new DWordMemory (Seg.CS, null, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x2e, 0x23, 0x15, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND EDX, [CS:0x12345678]' failed.");
}
示例11: AND_mem8_imm8
public void AND_mem8_imm8 ()
{
// AND Byte [0x12345678], 0x4
// AND (new ByteMemory(null, null, null, 0, 0x12345678), 0x4)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (new ByteMemory (null, null, null, 0, 0x12345678), 0x4);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x80, 0x25, 0x78, 0x56, 0x34, 0x12, 0x4 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND Byte [0x12345678], 0x4' failed.");
}
示例12: AND_reg16_mem16
public void AND_reg16_mem16 ()
{
// AND SI, [EBP]
// AND (R16.SI, new WordMemory(null, R32.EBP, null, 0))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R16.SI, new WordMemory (null, R32.EBP, null, 0));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x23, 0x75, 0x0 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND SI, [EBP]' failed.");
}
示例13: AND_reg8_mem8
public void AND_reg8_mem8 ()
{
// AND CL, [ES:EDX + ESI*1 + 0x12345678]
// AND (R8.CL, new ByteMemory(Seg.ES, R32.EDX, R32.ESI, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R8.CL, new ByteMemory (Seg.ES, R32.EDX, R32.ESI, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x26, 0x22, 0x8c, 0x32, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND CL, [ES:EDX + ESI*1 + 0x12345678]' failed.");
}
示例14: AND_mem32_reg32
public void AND_mem32_reg32 ()
{
// AND [0x12345678], EBX
// AND (new DWordMemory(null, null, null, 0, 0x12345678), R32.EBX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (new DWordMemory (null, null, null, 0, 0x12345678), R32.EBX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x21, 0x1d, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND [0x12345678], EBX' failed.");
}
示例15: AND_rmreg16_imm8
public void AND_rmreg16_imm8 ()
{
// AND DX, 0x9
// AND (R16.DX, 0x9)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.AND (R16.DX, 0x9);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x83, 0xe2, 0x9 };
Assert.IsTrue (CompareData (memoryStream, target), "'AND DX, 0x9' failed.");
}