public void BOUND_reg32_mem () { // BOUND EBP, [EBP + EBP*2] // BOUND (R32.EBP, new DWordMemory(null, R32.EBP, R32.EBP, 1)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BOUND (R32.EBP, new DWordMemory (null, R32.EBP, R32.EBP, 1)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x62, 0x6c, 0x6d, 0x0 }; Assert.IsTrue (CompareData (memoryStream, target), "'BOUND EBP, [EBP + EBP*2]' failed."); }
public void BOUND_reg16_mem () { // BOUND AX, [ES:ESI*4 + 0x12345678] // BOUND (R16.AX, new DWordMemory(Seg.ES, null, R32.ESI, 2, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.BOUND (R16.AX, new DWordMemory (Seg.ES, null, R32.ESI, 2, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x26, 0x66, 0x62, 0x4, 0xb5, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'BOUND AX, [ES:ESI*4 + 0x12345678]' failed."); }