BT() public method

BT mem32,imm8
public BT ( DWordMemory target, Byte source ) : void
target DWordMemory
source Byte
return void
Esempio n. 1
0
	public void BT_rmreg32_imm8 ()
	{
		// BT EAX, 0xd
		// BT (R32.EAX, 0xd)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (R32.EAX, 0xd);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0xf, 0xba, 0xe0, 0xd };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT EAX, 0xd' failed.");
	}
Esempio n. 2
0
	public void BT_rmreg32_reg32 ()
	{
		// BT EBX, EDX
		// BT (R32.EBX, R32.EDX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (R32.EBX, R32.EDX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0xf, 0xa3, 0xd3 };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT EBX, EDX' failed.");
	}
Esempio n. 3
0
	public void BT_rmreg16_imm8 ()
	{
		// BT SI, 0xf
		// BT (R16.SI, 0xf)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (R16.SI, 0xf);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xf, 0xba, 0xe6, 0xf };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT SI, 0xf' failed.");
	}
Esempio n. 4
0
	public void BT_rmreg16_reg16 ()
	{
		// BT DI, CX
		// BT (R16.DI, R16.CX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (R16.DI, R16.CX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xf, 0xa3, 0xcf };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT DI, CX' failed.");
	}
Esempio n. 5
0
	public void BT_mem32_imm8 ()
	{
		// BT DWord [ESP + ECX*2 + 0x12345678], 0x0
		// BT (new DWordMemory(null, R32.ESP, R32.ECX, 1, 0x12345678), 0x0)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (new DWordMemory (null, R32.ESP, R32.ECX, 1, 0x12345678), 0x0);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0xf, 0xba, 0xa4, 0x4c, 0x78, 0x56, 0x34, 0x12, 0x0 };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT DWord [ESP + ECX*2 + 0x12345678], 0x0' failed.");
	}
Esempio n. 6
0
	public void BT_mem16_imm8 ()
	{
		// BT Word [0x12345678], 0x6
		// BT (new WordMemory(null, null, null, 0, 0x12345678), 0x6)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (new WordMemory (null, null, null, 0, 0x12345678), 0x6);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xf, 0xba, 0x25, 0x78, 0x56, 0x34, 0x12, 0x6 };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT Word [0x12345678], 0x6' failed.");
	}
Esempio n. 7
0
	public void BT_mem32_reg32 ()
	{
		// BT [GS:EAX + 0x12345678], ECX
		// BT (new DWordMemory(Seg.GS, R32.EAX, null, 0, 0x12345678), R32.ECX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (new DWordMemory (Seg.GS, R32.EAX, null, 0, 0x12345678), R32.ECX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x65, 0xf, 0xa3, 0x88, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT [GS:EAX + 0x12345678], ECX' failed.");
	}
Esempio n. 8
0
	public void BT_mem16_reg16 ()
	{
		// BT [ESP + EBP*8], AX
		// BT (new WordMemory(null, R32.ESP, R32.EBP, 3), R16.AX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.BT (new WordMemory (null, R32.ESP, R32.EBP, 3), R16.AX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xf, 0xa3, 0x4, 0xec };
		Assert.IsTrue (CompareData (memoryStream, target), "'BT [ESP + EBP*8], AX' failed.");
	}