public BTC ( |
||
target | ||
source | Byte | |
return | void |
public void BTC_rmreg32_imm8 () { // BTC EBX, 0x7 // BTC (R32.EBX, 0x7) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (R32.EBX, 0x7); asm.Encode (memoryStream); byte [] target = new byte [] { 0xf, 0xba, 0xfb, 0x7 }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC EBX, 0x7' failed."); }
public void BTC_rmreg32_reg32 () { // BTC EBP, EBX // BTC (R32.EBP, R32.EBX) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (R32.EBP, R32.EBX); asm.Encode (memoryStream); byte [] target = new byte [] { 0xf, 0xbb, 0xdd }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC EBP, EBX' failed."); }
public void BTC_rmreg16_imm8 () { // BTC CX, 0x0 // BTC (R16.CX, 0x0) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (R16.CX, 0x0); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0xba, 0xf9, 0x0 }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC CX, 0x0' failed."); }
public void BTC_rmreg16_reg16 () { // BTC DX, BP // BTC (R16.DX, R16.BP) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (R16.DX, R16.BP); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0xbb, 0xea }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC DX, BP' failed."); }
public void BTC_mem32_imm8 () { // BTC DWord [FS:EDX*1 + 0x12345678], 0xf // BTC (new DWordMemory(Seg.FS, null, R32.EDX, 0, 0x12345678), 0xf) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (new DWordMemory (Seg.FS, null, R32.EDX, 0, 0x12345678), 0xf); asm.Encode (memoryStream); byte [] target = new byte [] { 0x64, 0xf, 0xba, 0xba, 0x78, 0x56, 0x34, 0x12, 0xf }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC DWord [FS:EDX*1 + 0x12345678], 0xf' failed."); }
public void BTC_mem16_imm8 () { // BTC Word [EAX + EBX*1], 0xb // BTC (new WordMemory(null, R32.EAX, R32.EBX, 0), 0xb) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (new WordMemory (null, R32.EAX, R32.EBX, 0), 0xb); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0xba, 0x3c, 0x18, 0xb }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC Word [EAX + EBX*1], 0xb' failed."); }
public void BTC_mem32_reg32 () { // BTC [EDX + ESI*2 + 0x12345678], EBP // BTC (new DWordMemory(null, R32.EDX, R32.ESI, 1, 0x12345678), R32.EBP) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (new DWordMemory (null, R32.EDX, R32.ESI, 1, 0x12345678), R32.EBP); asm.Encode (memoryStream); byte [] target = new byte [] { 0xf, 0xbb, 0xac, 0x72, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC [EDX + ESI*2 + 0x12345678], EBP' failed."); }
public void BTC_mem16_reg16 () { // BTC [EBP + EDX*4 + 0x12345678], DI // BTC (new WordMemory(null, R32.EBP, R32.EDX, 2, 0x12345678), R16.DI) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BTC (new WordMemory (null, R32.EBP, R32.EDX, 2, 0x12345678), R16.DI); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0xbb, 0xbc, 0x95, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'BTC [EBP + EDX*4 + 0x12345678], DI' failed."); }