本文整理匯總了C#中SharpOS.AOT.X86.Assembly.ADD方法的典型用法代碼示例。如果您正苦於以下問題:C# Assembly.ADD方法的具體用法?C# Assembly.ADD怎麽用?C# Assembly.ADD使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SharpOS.AOT.X86.Assembly
的用法示例。
在下文中一共展示了Assembly.ADD方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ADD_rmreg16_imm16
public void ADD_rmreg16_imm16 ()
{
// ADD BP, 0xd5c
// ADD (R16.BP, 0xd5c)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R16.BP, 0xd5c);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x81, 0xc5, 0x5c, 0xd };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD BP, 0xd5c' failed.");
}
示例2: ADD_rmreg32_reg32
public void ADD_rmreg32_reg32 ()
{
// ADD EBP, EBP
// ADD (R32.EBP, R32.EBP)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R32.EBP, R32.EBP);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x1, 0xed };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD EBP, EBP' failed.");
}
示例3: ADD_rmreg8_imm8
public void ADD_rmreg8_imm8 ()
{
// ADD BH, 0x4
// ADD (R8.BH, 0x4)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R8.BH, 0x4);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x80, 0xc7, 0x4 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD BH, 0x4' failed.");
}
示例4: ADD_rmreg8_reg8
public void ADD_rmreg8_reg8 ()
{
// ADD BH, DH
// ADD (R8.BH, R8.DH)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R8.BH, R8.DH);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x0, 0xf7 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD BH, DH' failed.");
}
示例5: ADD_rmreg16_reg16
public void ADD_rmreg16_reg16 ()
{
// ADD CX, AX
// ADD (R16.CX, R16.AX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R16.CX, R16.AX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x1, 0xc1 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD CX, AX' failed.");
}
示例6: ADD_mem16_reg16
public void ADD_mem16_reg16 ()
{
// ADD [CS:EDX], BP
// ADD (new WordMemory(Seg.CS, R32.EDX, null, 0), R16.BP)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (new WordMemory (Seg.CS, R32.EDX, null, 0), R16.BP);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x2e, 0x66, 0x1, 0x2a };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD [CS:EDX], BP' failed.");
}
示例7: ADD_mem32_imm8
public void ADD_mem32_imm8 ()
{
// ADD DWord [CS:EBX + 0x12345678], 0xc
// ADD (new DWordMemory(Seg.CS, R32.EBX, null, 0, 0x12345678), 0xc)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (new DWordMemory (Seg.CS, R32.EBX, null, 0, 0x12345678), 0xc);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x2e, 0x83, 0x83, 0x78, 0x56, 0x34, 0x12, 0xc };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD DWord [CS:EBX + 0x12345678], 0xc' failed.");
}
示例8: ADD_mem16_imm16
public void ADD_mem16_imm16 ()
{
// ADD Word [0x12345678], 0x77b
// ADD (new WordMemory(null, null, null, 0, 0x12345678), 0x77b)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (new WordMemory (null, null, null, 0, 0x12345678), 0x77b);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x81, 0x5, 0x78, 0x56, 0x34, 0x12, 0x7b, 0x7 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD Word [0x12345678], 0x77b' failed.");
}
示例9: ADD_mem32_imm32
public void ADD_mem32_imm32 ()
{
// ADD DWord [ES:0x12345678], 0x55afc7d
// ADD (new DWordMemory(Seg.ES, null, null, 0, 0x12345678), 0x55afc7d)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (new DWordMemory (Seg.ES, null, null, 0, 0x12345678), 0x55afc7d);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x26, 0x81, 0x5, 0x78, 0x56, 0x34, 0x12, 0x7d, 0xfc, 0x5a, 0x5 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD DWord [ES:0x12345678], 0x55afc7d' failed.");
}
示例10: ADD_reg32_mem32
public void ADD_reg32_mem32 ()
{
// ADD ESI, [ESI*2]
// ADD (R32.ESI, new DWordMemory(null, null, R32.ESI, 1))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R32.ESI, new DWordMemory (null, null, R32.ESI, 1));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x3, 0x34, 0x36 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD ESI, [ESI*2]' failed.");
}
示例11: ADD_mem8_imm8
public void ADD_mem8_imm8 ()
{
// ADD Byte [ESP + EBX*2 + 0x12345678], 0x8
// ADD (new ByteMemory(null, R32.ESP, R32.EBX, 1, 0x12345678), 0x8)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (new ByteMemory (null, R32.ESP, R32.EBX, 1, 0x12345678), 0x8);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x80, 0x84, 0x5c, 0x78, 0x56, 0x34, 0x12, 0x8 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD Byte [ESP + EBX*2 + 0x12345678], 0x8' failed.");
}
示例12: ADD_reg16_mem16
public void ADD_reg16_mem16 ()
{
// ADD CX, [GS:EBX + 0x12345678]
// ADD (R16.CX, new WordMemory(Seg.GS, R32.EBX, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R16.CX, new WordMemory (Seg.GS, R32.EBX, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x65, 0x66, 0x3, 0x8b, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD CX, [GS:EBX + 0x12345678]' failed.");
}
示例13: ADD_reg8_mem8
public void ADD_reg8_mem8 ()
{
// ADD AL, [EDI]
// ADD (R8.AL, new ByteMemory(null, R32.EDI, null, 0))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R8.AL, new ByteMemory (null, R32.EDI, null, 0));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x2, 0x7 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD AL, [EDI]' failed.");
}
示例14: ADD_mem32_reg32
public void ADD_mem32_reg32 ()
{
// ADD [EAX + EDX*1], EBX
// ADD (new DWordMemory(null, R32.EAX, R32.EDX, 0), R32.EBX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (new DWordMemory (null, R32.EAX, R32.EDX, 0), R32.EBX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x1, 0x1c, 0x10 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD [EAX + EDX*1], EBX' failed.");
}
示例15: ADD_rmreg32_imm32
public void ADD_rmreg32_imm32 ()
{
// ADD ESP, 0x54b85b5
// ADD (R32.ESP, 0x54b85b5)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.ADD (R32.ESP, 0x54b85b5);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x81, 0xc4, 0xb5, 0x85, 0x4b, 0x5 };
Assert.IsTrue (CompareData (memoryStream, target), "'ADD ESP, 0x54b85b5' failed.");
}