本文整理匯總了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.");
}