public BSF ( |
||
target | ||
source | ||
return | void |
public void BSF_reg32_mem32 () { // BSF ESI, [ES:0x12345678] // BSF (R32.ESI, new DWordMemory(Seg.ES, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BSF (R32.ESI, new DWordMemory (Seg.ES, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x26, 0xf, 0xbc, 0x35, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'BSF ESI, [ES:0x12345678]' failed."); }
public void BSF_reg32_rmreg32 () { // BSF EBX, ESI // BSF (R32.EBX, R32.ESI) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BSF (R32.EBX, R32.ESI); asm.Encode (memoryStream); byte [] target = new byte [] { 0xf, 0xbc, 0xde }; Assert.IsTrue (CompareData (memoryStream, target), "'BSF EBX, ESI' failed."); }
public void BSF_reg16_mem16 () { // BSF SI, [ESI + 0x12345678] // BSF (R16.SI, new WordMemory(null, R32.ESI, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BSF (R16.SI, new WordMemory (null, R32.ESI, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0xbc, 0xb6, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'BSF SI, [ESI + 0x12345678]' failed."); }
public void BSF_reg16_rmreg16 () { // BSF SP, BX // BSF (R16.SP, R16.BX) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BSF (R16.SP, R16.BX); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xf, 0xbc, 0xe3 }; Assert.IsTrue (CompareData (memoryStream, target), "'BSF SP, BX' failed."); }