SBB() public method

SBB mem8,imm8
public SBB ( ByteMemory target, Byte source ) : void
target ByteMemory
source Byte
return void
Esempio n. 1
0
	public void SBB_rmreg32_imm32 ()
	{
		// SBB EBX, 0xbf38241
		// SBB (R32.EBX, 0xbf38241)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R32.EBX, 0xbf38241);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x81, 0xdb, 0x41, 0x82, 0xf3, 0xb };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB EBX, 0xbf38241' failed.");
	}
Esempio n. 2
0
	public void SBB_rmreg32_reg32 ()
	{
		// SBB EDI, EAX
		// SBB (R32.EDI, R32.EAX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R32.EDI, R32.EAX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x19, 0xc7 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB EDI, EAX' failed.");
	}
Esempio n. 3
0
	public void SBB_rmreg8_imm8 ()
	{
		// SBB DH, 0x0
		// SBB (R8.DH, 0x0)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R8.DH, 0x0);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x80, 0xde, 0x0 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB DH, 0x0' failed.");
	}
Esempio n. 4
0
	public void SBB_rmreg8_reg8 ()
	{
		// SBB BH, BH
		// SBB (R8.BH, R8.BH)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R8.BH, R8.BH);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x18, 0xff };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB BH, BH' failed.");
	}
Esempio n. 5
0
	public void SBB_rmreg16_reg16 ()
	{
		// SBB DX, BX
		// SBB (R16.DX, R16.BX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R16.DX, R16.BX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x19, 0xda };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB DX, BX' failed.");
	}
Esempio n. 6
0
	public void SBB_mem16_reg16 ()
	{
		// SBB [ESI*1 + 0x12345678], SP
		// SBB (new WordMemory(null, null, R32.ESI, 0, 0x12345678), R16.SP)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new WordMemory (null, null, R32.ESI, 0, 0x12345678), R16.SP);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x19, 0xa6, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB [ESI*1 + 0x12345678], SP' failed.");
	}
Esempio n. 7
0
	public void SBB_mem32_imm8 ()
	{
		// SBB DWord [EDX + EAX*4 + 0x12345678], 0xe
		// SBB (new DWordMemory(null, R32.EDX, R32.EAX, 2, 0x12345678), 0xe)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new DWordMemory (null, R32.EDX, R32.EAX, 2, 0x12345678), 0xe);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x83, 0x9c, 0x82, 0x78, 0x56, 0x34, 0x12, 0xe };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB DWord [EDX + EAX*4 + 0x12345678], 0xe' failed.");
	}
Esempio n. 8
0
	public void SBB_mem16_imm16 ()
	{
		// SBB Word [ESP + EBX*2], 0xc71
		// SBB (new WordMemory(null, R32.ESP, R32.EBX, 1), 0xc71)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new WordMemory (null, R32.ESP, R32.EBX, 1), 0xc71);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x81, 0x1c, 0x5c, 0x71, 0xc };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB Word [ESP + EBX*2], 0xc71' failed.");
	}
Esempio n. 9
0
	public void SBB_mem32_imm32 ()
	{
		// SBB DWord [0x12345678], 0x7072650
		// SBB (new DWordMemory(null, null, null, 0, 0x12345678), 0x7072650)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new DWordMemory (null, null, null, 0, 0x12345678), 0x7072650);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x81, 0x1d, 0x78, 0x56, 0x34, 0x12, 0x50, 0x26, 0x7, 0x7 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB DWord [0x12345678], 0x7072650' failed.");
	}
Esempio n. 10
0
	public void SBB_reg32_mem32 ()
	{
		// SBB ESP, [DS:0x12345678]
		// SBB (R32.ESP, new DWordMemory(Seg.DS, null, null, 0, 0x12345678))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R32.ESP, new DWordMemory (Seg.DS, null, null, 0, 0x12345678));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x3e, 0x1b, 0x25, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB ESP, [DS:0x12345678]' failed.");
	}
Esempio n. 11
0
	public void SBB_mem8_imm8 ()
	{
		// SBB Byte [0x12345678], 0xb
		// SBB (new ByteMemory(null, null, null, 0, 0x12345678), 0xb)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new ByteMemory (null, null, null, 0, 0x12345678), 0xb);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x80, 0x1d, 0x78, 0x56, 0x34, 0x12, 0xb };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB Byte [0x12345678], 0xb' failed.");
	}
Esempio n. 12
0
	public void SBB_reg16_mem16 ()
	{
		// SBB BX, [ES:0x12345678]
		// SBB (R16.BX, new WordMemory(Seg.ES, null, null, 0, 0x12345678))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R16.BX, new WordMemory (Seg.ES, null, null, 0, 0x12345678));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x26, 0x66, 0x1b, 0x1d, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB BX, [ES:0x12345678]' failed.");
	}
Esempio n. 13
0
	public void SBB_reg8_mem8 ()
	{
		// SBB BH, [EDX + EDI*8 + 0x12345678]
		// SBB (R8.BH, new ByteMemory(null, R32.EDX, R32.EDI, 3, 0x12345678))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R8.BH, new ByteMemory (null, R32.EDX, R32.EDI, 3, 0x12345678));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x1a, 0xbc, 0xfa, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB BH, [EDX + EDI*8 + 0x12345678]' failed.");
	}
Esempio n. 14
0
	public void SBB_mem32_reg32 ()
	{
		// SBB [ESI + EBX*8 + 0x12345678], EBP
		// SBB (new DWordMemory(null, R32.ESI, R32.EBX, 3, 0x12345678), R32.EBP)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new DWordMemory (null, R32.ESI, R32.EBX, 3, 0x12345678), R32.EBP);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x19, 0xac, 0xde, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB [ESI + EBX*8 + 0x12345678], EBP' failed.");
	}
Esempio n. 15
0
	public void SBB_rmreg16_imm8 ()
	{
		// SBB CX, 0x6
		// SBB (R16.CX, 0x6)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R16.CX, 0x6);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0x83, 0xd9, 0x6 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB CX, 0x6' failed.");
	}
Esempio n. 16
0
	public void SBB_mem16_imm8 ()
	{
		// SBB Word [FS:EDX*4], 0xa
		// SBB (new WordMemory(Seg.FS, null, R32.EDX, 2), 0xa)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new WordMemory (Seg.FS, null, R32.EDX, 2), 0xa);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x64, 0x66, 0x83, 0x1c, 0x95, 0x0, 0x0, 0x0, 0x0, 0xa };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB Word [FS:EDX*4], 0xa' failed.");
	}
Esempio n. 17
0
	public void SBB_rmreg32_imm8 ()
	{
		// SBB EAX, 0xd
		// SBB (R32.EAX, 0xd)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (R32.EAX, 0xd);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x83, 0xd8, 0xd };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB EAX, 0xd' failed.");
	}
Esempio n. 18
0
	public void SBB_mem8_reg8 ()
	{
		// SBB [0x12345678], AH
		// SBB (new ByteMemory(null, null, null, 0, 0x12345678), R8.AH)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.SBB (new ByteMemory (null, null, null, 0, 0x12345678), R8.AH);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x18, 0x25, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'SBB [0x12345678], AH' failed.");
	}