本文整理汇总了C#中SharpOS.AOT.X86.Assembly.SUB方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.SUB方法的具体用法?C# Assembly.SUB怎么用?C# Assembly.SUB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpOS.AOT.X86.Assembly
的用法示例。
在下文中一共展示了Assembly.SUB方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SUB_rmreg32_reg32
public void SUB_rmreg32_reg32 ()
{
// SUB EDX, ESI
// SUB (R32.EDX, R32.ESI)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R32.EDX, R32.ESI);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x29, 0xf2 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB EDX, ESI' failed.");
}
示例2: SUB_rmreg8_imm8
public void SUB_rmreg8_imm8 ()
{
// SUB DH, 0x6
// SUB (R8.DH, 0x6)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R8.DH, 0x6);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x80, 0xee, 0x6 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB DH, 0x6' failed.");
}
示例3: SUB_rmreg8_reg8
public void SUB_rmreg8_reg8 ()
{
// SUB AH, AL
// SUB (R8.AH, R8.AL)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R8.AH, R8.AL);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x28, 0xc4 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB AH, AL' failed.");
}
示例4: SUB_rmreg16_reg16
public void SUB_rmreg16_reg16 ()
{
// SUB BX, SP
// SUB (R16.BX, R16.SP)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R16.BX, R16.SP);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x29, 0xe3 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB BX, SP' failed.");
}
示例5: SUB_mem16_reg16
public void SUB_mem16_reg16 ()
{
// SUB [0x12345678], DX
// SUB (new WordMemory(null, null, null, 0, 0x12345678), R16.DX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (new WordMemory (null, null, null, 0, 0x12345678), R16.DX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x29, 0x15, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB [0x12345678], DX' failed.");
}
示例6: SUB_mem32_imm8
public void SUB_mem32_imm8 ()
{
// SUB DWord [ESP + ESI*2 + 0x12345678], 0x3
// SUB (new DWordMemory(null, R32.ESP, R32.ESI, 1, 0x12345678), 0x3)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (new DWordMemory (null, R32.ESP, R32.ESI, 1, 0x12345678), 0x3);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x83, 0xac, 0x74, 0x78, 0x56, 0x34, 0x12, 0x3 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB DWord [ESP + ESI*2 + 0x12345678], 0x3' failed.");
}
示例7: SUB_mem16_imm16
public void SUB_mem16_imm16 ()
{
// SUB Word [DS:ESI*4 + 0x12345678], 0x396
// SUB (new WordMemory(Seg.DS, null, R32.ESI, 2, 0x12345678), 0x396)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (new WordMemory (Seg.DS, null, R32.ESI, 2, 0x12345678), 0x396);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x3e, 0x66, 0x81, 0x2c, 0xb5, 0x78, 0x56, 0x34, 0x12, 0x96, 0x3 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB Word [DS:ESI*4 + 0x12345678], 0x396' failed.");
}
示例8: SUB_rmreg16_imm8
public void SUB_rmreg16_imm8 ()
{
// SUB SP, 0x8
// SUB (R16.SP, 0x8)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R16.SP, 0x8);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x83, 0xec, 0x8 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB SP, 0x8' failed.");
}
示例9: SUB_reg32_mem32
public void SUB_reg32_mem32 ()
{
// SUB ECX, [DS:ECX + 0x12345678]
// SUB (R32.ECX, new DWordMemory(Seg.DS, R32.ECX, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R32.ECX, new DWordMemory (Seg.DS, R32.ECX, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x3e, 0x2b, 0x89, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB ECX, [DS:ECX + 0x12345678]' failed.");
}
示例10: SUB_mem8_imm8
public void SUB_mem8_imm8 ()
{
// SUB Byte [ECX*1 + 0x12345678], 0x2
// SUB (new ByteMemory(null, null, R32.ECX, 0, 0x12345678), 0x2)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (new ByteMemory (null, null, R32.ECX, 0, 0x12345678), 0x2);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x80, 0xa9, 0x78, 0x56, 0x34, 0x12, 0x2 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB Byte [ECX*1 + 0x12345678], 0x2' failed.");
}
示例11: SUB_reg16_mem16
public void SUB_reg16_mem16 ()
{
// SUB CX, [CS:0x12345678]
// SUB (R16.CX, new WordMemory(Seg.CS, null, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R16.CX, new WordMemory (Seg.CS, null, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x2e, 0x66, 0x2b, 0xd, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB CX, [CS:0x12345678]' failed.");
}
示例12: SUB_reg8_mem8
public void SUB_reg8_mem8 ()
{
// SUB BH, [CS:ECX + 0x12345678]
// SUB (R8.BH, new ByteMemory(Seg.CS, R32.ECX, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R8.BH, new ByteMemory (Seg.CS, R32.ECX, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x2e, 0x2a, 0xb9, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB BH, [CS:ECX + 0x12345678]' failed.");
}
示例13: SUB_mem32_reg32
public void SUB_mem32_reg32 ()
{
// SUB [ESP + EDX*2 + 0x12345678], ESP
// SUB (new DWordMemory(null, R32.ESP, R32.EDX, 1, 0x12345678), R32.ESP)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (new DWordMemory (null, R32.ESP, R32.EDX, 1, 0x12345678), R32.ESP);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x29, 0xa4, 0x54, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB [ESP + EDX*2 + 0x12345678], ESP' failed.");
}
示例14: SUB_rmreg16_imm16
public void SUB_rmreg16_imm16 ()
{
// SUB CX, 0xa8a
// SUB (R16.CX, 0xa8a)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (R16.CX, 0xa8a);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x81, 0xe9, 0x8a, 0xa };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB CX, 0xa8a' failed.");
}
示例15: SUB_mem32_imm32
public void SUB_mem32_imm32 ()
{
// SUB DWord [EDX + EDI*4 + 0x12345678], 0x435fcbf
// SUB (new DWordMemory(null, R32.EDX, R32.EDI, 2, 0x12345678), 0x435fcbf)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.SUB (new DWordMemory (null, R32.EDX, R32.EDI, 2, 0x12345678), 0x435fcbf);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x81, 0xac, 0xba, 0x78, 0x56, 0x34, 0x12, 0xbf, 0xfc, 0x35, 0x4 };
Assert.IsTrue (CompareData (memoryStream, target), "'SUB DWord [EDX + EDI*4 + 0x12345678], 0x435fcbf' failed.");
}