SHL() public method

SHL mem8,imm8
public SHL ( ByteMemory target, Byte source ) : void
target ByteMemory
source Byte
return void
Esempio n. 1
0
	public void SHL_rmreg32_imm8 ()
	{
		// SHL ESI, 0xb
		// SHL (R32.ESI, 0xb)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SHL (R32.ESI, 0xb);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0xc1, 0xe6, 0xb };
		Assert.IsTrue (CompareData (memoryStream, target), "'SHL ESI, 0xb' failed.");
	}
Esempio n. 2
0
	public void SHL_rmreg16_imm8 ()
	{
		// SHL BX, 0xe
		// SHL (R16.BX, 0xe)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SHL (R16.BX, 0xe);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xc1, 0xe3, 0xe };
		Assert.IsTrue (CompareData (memoryStream, target), "'SHL BX, 0xe' failed.");
	}
Esempio n. 3
0
	public void SHL_mem16_imm8 ()
	{
		// SHL Word [0x12345678], 0x3
		// SHL (new WordMemory(null, null, null, 0, 0x12345678), 0x3)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SHL (new WordMemory (null, null, null, 0, 0x12345678), 0x3);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xc1, 0x25, 0x78, 0x56, 0x34, 0x12, 0x3 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SHL Word [0x12345678], 0x3' failed.");
	}
Esempio n. 4
0
	public void SHL_mem32_imm8 ()
	{
		// SHL DWord [FS:EDI], 0x6
		// SHL (new DWordMemory(Seg.FS, R32.EDI, null, 0), 0x6)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SHL (new DWordMemory (Seg.FS, R32.EDI, null, 0), 0x6);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x64, 0xc1, 0x27, 0x6 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SHL DWord [FS:EDI], 0x6' failed.");
	}
Esempio n. 5
0
	public void SHL_mem8_imm8 ()
	{
		// SHL Byte [EBP*4 + 0x12345678], 0x2
		// SHL (new ByteMemory(null, null, R32.EBP, 2, 0x12345678), 0x2)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SHL (new ByteMemory (null, null, R32.EBP, 2, 0x12345678), 0x2);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0xc0, 0x24, 0xad, 0x78, 0x56, 0x34, 0x12, 0x2 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SHL Byte [EBP*4 + 0x12345678], 0x2' failed.");
	}