本文整理汇总了C#中SharpOS.AOT.X86.Assembly.PUSH方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.PUSH方法的具体用法?C# Assembly.PUSH怎么用?C# Assembly.PUSH使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpOS.AOT.X86.Assembly
的用法示例。
在下文中一共展示了Assembly.PUSH方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PUSH_segreg
public void PUSH_segreg ()
{
// PUSH SS
// PUSH (Seg.SS)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (Seg.SS);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x16 };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH SS' failed.");
}
示例2: PUSH_imm16
public void PUSH_imm16 ()
{
// PUSH WORD 0xd49
// PUSH (0xd49)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (0xd49);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x68, 0x49, 0xd };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH WORD 0xd49' failed.");
}
示例3: PUSH_imm32
public void PUSH_imm32 ()
{
// PUSH 0x6dab45b
// PUSH (0x6dab45b)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (0x6dab45b);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x68, 0x5b, 0xb4, 0xda, 0x6 };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH 0x6dab45b' failed.");
}
示例4: PUSH_imm8
public void PUSH_imm8 ()
{
// PUSH 0x7
// PUSH (0x7)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (0x7);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x6a, 0x7 };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH 0x7' failed.");
}
示例5: PUSH_mem32
public void PUSH_mem32 ()
{
// PUSH DWord [SS:0x12345678]
// PUSH (new DWordMemory(Seg.SS, null, null, 0, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (new DWordMemory (Seg.SS, null, null, 0, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x36, 0xff, 0x35, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH DWord [SS:0x12345678]' failed.");
}
示例6: PUSH_mem16
public void PUSH_mem16 ()
{
// PUSH Word [GS:EBP + EDX*8 + 0x12345678]
// PUSH (new WordMemory(Seg.GS, R32.EBP, R32.EDX, 3, 0x12345678))
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (new WordMemory (Seg.GS, R32.EBP, R32.EDX, 3, 0x12345678));
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x65, 0x66, 0xff, 0xb4, 0xd5, 0x78, 0x56, 0x34, 0x12 };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH Word [GS:EBP + EDX*8 + 0x12345678]' failed.");
}
示例7: PUSH_reg32
public void PUSH_reg32 ()
{
// PUSH EBP
// PUSH (R32.EBP)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (R32.EBP);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x55 };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH EBP' failed.");
}
示例8: PUSH_reg16
public void PUSH_reg16 ()
{
// PUSH AX
// PUSH (R16.AX)
MemoryStream memoryStream = new MemoryStream ();
Assembly asm = new Assembly ();
asm.PUSH (R16.AX);
asm.Encode (memoryStream);
byte [] target = new byte [] { 0x66, 0x50 };
Assert.IsTrue (CompareData (memoryStream, target), "'PUSH AX' failed.");
}