当前位置: 首页>>代码示例>>C#>>正文


C# Assembly.CMP方法代码示例

本文整理汇总了C#中SharpOS.AOT.X86.Assembly.CMP方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.CMP方法的具体用法?C# Assembly.CMP怎么用?C# Assembly.CMP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SharpOS.AOT.X86.Assembly的用法示例。


在下文中一共展示了Assembly.CMP方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CMP_rmreg16_imm16

	public void CMP_rmreg16_imm16 ()
	{
		// CMP AX, 0xa82
		// CMP (R16.AX, 0xa82)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R16.AX, 0xa82);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x3d, 0x82, 0xa };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP AX, 0xa82' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例2: CMP_rmreg32_reg32

	public void CMP_rmreg32_reg32 ()
	{
		// CMP EBP, EBP
		// CMP (R32.EBP, R32.EBP)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R32.EBP, R32.EBP);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x39, 0xed };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP EBP, EBP' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例3: CMP_rmreg8_imm8

	public void CMP_rmreg8_imm8 ()
	{
		// CMP CH, 0x3
		// CMP (R8.CH, 0x3)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R8.CH, 0x3);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x80, 0xfd, 0x3 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP CH, 0x3' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例4: CMP_rmreg8_reg8

	public void CMP_rmreg8_reg8 ()
	{
		// CMP CH, CL
		// CMP (R8.CH, R8.CL)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R8.CH, R8.CL);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x38, 0xcd };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP CH, CL' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例5: CMP_rmreg16_reg16

	public void CMP_rmreg16_reg16 ()
	{
		// CMP SI, AX
		// CMP (R16.SI, R16.AX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R16.SI, R16.AX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x39, 0xc6 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP SI, AX' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例6: CMP_mem16_reg16

	public void CMP_mem16_reg16 ()
	{
		// CMP [0x12345678], DI
		// CMP (new WordMemory(null, null, null, 0, 0x12345678), R16.DI)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (new WordMemory (null, null, null, 0, 0x12345678), R16.DI);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x39, 0x3d, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP [0x12345678], DI' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例7: CMP_mem32_imm8

	public void CMP_mem32_imm8 ()
	{
		// CMP DWord [EDX + EBP*1 + 0x12345678], 0xb
		// CMP (new DWordMemory(null, R32.EDX, R32.EBP, 0, 0x12345678), 0xb)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (new DWordMemory (null, R32.EDX, R32.EBP, 0, 0x12345678), 0xb);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x83, 0xbc, 0x2a, 0x78, 0x56, 0x34, 0x12, 0xb };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP DWord [EDX + EBP*1 + 0x12345678], 0xb' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例8: CMP_mem16_imm16

	public void CMP_mem16_imm16 ()
	{
		// CMP Word [ES:EBP], 0x8ad
		// CMP (new WordMemory(Seg.ES, R32.EBP, null, 0), 0x8ad)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (new WordMemory (Seg.ES, R32.EBP, null, 0), 0x8ad);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x26, 0x66, 0x81, 0x7d, 0x0, 0xad, 0x8 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP Word [ES:EBP], 0x8ad' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例9: CMP_mem32_imm32

	public void CMP_mem32_imm32 ()
	{
		// CMP DWord [ES:0x12345678], 0x6abbff6
		// CMP (new DWordMemory(Seg.ES, null, null, 0, 0x12345678), 0x6abbff6)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (new DWordMemory (Seg.ES, null, null, 0, 0x12345678), 0x6abbff6);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x26, 0x81, 0x3d, 0x78, 0x56, 0x34, 0x12, 0xf6, 0xbf, 0xab, 0x6 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP DWord [ES:0x12345678], 0x6abbff6' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例10: CMP_reg32_mem32

	public void CMP_reg32_mem32 ()
	{
		// CMP EDI, [ESI*8]
		// CMP (R32.EDI, new DWordMemory(null, null, R32.ESI, 3))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R32.EDI, new DWordMemory (null, null, R32.ESI, 3));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x3b, 0x3c, 0xf5, 0x0, 0x0, 0x0, 0x0 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP EDI, [ESI*8]' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例11: CMP_mem8_imm8

	public void CMP_mem8_imm8 ()
	{
		// CMP Byte [DS:0x12345678], 0x7
		// CMP (new ByteMemory(Seg.DS, null, null, 0, 0x12345678), 0x7)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (new ByteMemory (Seg.DS, null, null, 0, 0x12345678), 0x7);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x3e, 0x80, 0x3d, 0x78, 0x56, 0x34, 0x12, 0x7 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP Byte [DS:0x12345678], 0x7' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例12: CMP_reg16_mem16

	public void CMP_reg16_mem16 ()
	{
		// CMP SI, [0x12345678]
		// CMP (R16.SI, new WordMemory(null, null, null, 0, 0x12345678))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R16.SI, new WordMemory (null, null, null, 0, 0x12345678));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x3b, 0x35, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP SI, [0x12345678]' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例13: CMP_reg8_mem8

	public void CMP_reg8_mem8 ()
	{
		// CMP BL, [DS:0x12345678]
		// CMP (R8.BL, new ByteMemory(Seg.DS, null, null, 0, 0x12345678))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R8.BL, new ByteMemory (Seg.DS, null, null, 0, 0x12345678));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x3e, 0x3a, 0x1d, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP BL, [DS:0x12345678]' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例14: CMP_mem32_reg32

	public void CMP_mem32_reg32 ()
	{
		// CMP [ECX], EDX
		// CMP (new DWordMemory(null, R32.ECX, null, 0), R32.EDX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (new DWordMemory (null, R32.ECX, null, 0), R32.EDX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x39, 0x11 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP [ECX], EDX' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs

示例15: CMP_rmreg32_imm32

	public void CMP_rmreg32_imm32 ()
	{
		// CMP EBP, 0xea3f51f
		// CMP (R32.EBP, 0xea3f51f)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMP (R32.EBP, 0xea3f51f);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x81, 0xfd, 0x1f, 0xf5, 0xa3, 0xe };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMP EBP, 0xea3f51f' failed.");
	}
开发者ID:sharpos,项目名称:SharpOS,代码行数:11,代码来源:X86.cs


注:本文中的SharpOS.AOT.X86.Assembly.CMP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。