public void OR_reg16_mem16 () { // OR DX, [EDI + 0x12345678] // OR (R16.DX, new WordMemory(null, R32.EDI, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R16.DX, new WordMemory (null, R32.EDI, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0xb, 0x97, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR DX, [EDI + 0x12345678]' failed."); }
public void OR_reg32_mem32 () { // OR EBX, [0x12345678] // OR (R32.EBX, new DWordMemory(null, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R32.EBX, new DWordMemory (null, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0xb, 0x1d, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR EBX, [0x12345678]' failed."); }
public void OR_mem32_reg32 () { // OR [CS:EAX + EBX*2], EDI // OR (new DWordMemory(Seg.CS, R32.EAX, R32.EBX, 1), R32.EDI) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new DWordMemory (Seg.CS, R32.EAX, R32.EBX, 1), R32.EDI); asm.Encode (memoryStream); byte [] target = new byte [] { 0x2e, 0x9, 0x3c, 0x58 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR [CS:EAX + EBX*2], EDI' failed."); }
public void OR_reg8_mem8 () { // OR AL, [GS:0x12345678] // OR (R8.AL, new ByteMemory(Seg.GS, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R8.AL, new ByteMemory (Seg.GS, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x65, 0xa, 0x5, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR AL, [GS:0x12345678]' failed."); }
public void OR_rmreg8_reg8 () { // OR CH, CH // OR (R8.CH, R8.CH) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R8.CH, R8.CH); asm.Encode (memoryStream); byte [] target = new byte [] { 0x8, 0xed }; Assert.IsTrue (CompareData (memoryStream, target), "'OR CH, CH' failed."); }
public void OR_mem16_reg16 () { // OR [ES:EDI*2], DX // OR (new WordMemory(Seg.ES, null, R32.EDI, 1), R16.DX) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new WordMemory (Seg.ES, null, R32.EDI, 1), R16.DX); asm.Encode (memoryStream); byte [] target = new byte [] { 0x26, 0x66, 0x9, 0x14, 0x3f }; Assert.IsTrue (CompareData (memoryStream, target), "'OR [ES:EDI*2], DX' failed."); }
public void OR_rmreg16_imm8 () { // OR AX, 0x1 // OR (R16.AX, 0x1) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R16.AX, 0x1); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0x83, 0xc8, 0x1 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR AX, 0x1' failed."); }
public void OR_mem32_imm32 () { // OR DWord [CS:EBP + EAX*8], 0xbeab706 // OR (new DWordMemory(Seg.CS, R32.EBP, R32.EAX, 3), 0xbeab706) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new DWordMemory (Seg.CS, R32.EBP, R32.EAX, 3), 0xbeab706); asm.Encode (memoryStream); byte [] target = new byte [] { 0x2e, 0x81, 0x4c, 0xc5, 0x0, 0x6, 0xb7, 0xea, 0xb }; Assert.IsTrue (CompareData (memoryStream, target), "'OR DWord [CS:EBP + EAX*8], 0xbeab706' failed."); }
public void OR_rmreg16_imm16 () { // OR SI, 0xee1 // OR (R16.SI, 0xee1) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R16.SI, 0xee1); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0x81, 0xce, 0xe1, 0xe }; Assert.IsTrue (CompareData (memoryStream, target), "'OR SI, 0xee1' failed."); }
public void OR_rmreg32_imm32 () { // OR EBP, 0x260018b // OR (R32.EBP, 0x260018b) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R32.EBP, 0x260018b); asm.Encode (memoryStream); byte [] target = new byte [] { 0x81, 0xcd, 0x8b, 0x1, 0x60, 0x2 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR EBP, 0x260018b' failed."); }
public void OR_rmreg8_imm8 () { // OR CH, 0xb // OR (R8.CH, 0xb) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R8.CH, 0xb); asm.Encode (memoryStream); byte [] target = new byte [] { 0x80, 0xcd, 0xb }; Assert.IsTrue (CompareData (memoryStream, target), "'OR CH, 0xb' failed."); }
public void OR_rmreg32_reg32 () { // OR EBX, ESP // OR (R32.EBX, R32.ESP) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R32.EBX, R32.ESP); asm.Encode (memoryStream); byte [] target = new byte [] { 0x9, 0xe3 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR EBX, ESP' failed."); }
public void OR_rmreg16_reg16 () { // OR SI, SI // OR (R16.SI, R16.SI) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R16.SI, R16.SI); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0x9, 0xf6 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR SI, SI' failed."); }
public void OR_mem8_imm8 () { // OR Byte [SS:0x12345678], 0x7 // OR (new ByteMemory(Seg.SS, null, null, 0, 0x12345678), 0x7) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new ByteMemory (Seg.SS, null, null, 0, 0x12345678), 0x7); asm.Encode (memoryStream); byte [] target = new byte [] { 0x36, 0x80, 0xd, 0x78, 0x56, 0x34, 0x12, 0x7 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR Byte [SS:0x12345678], 0x7' failed."); }
public void OR_rmreg32_imm8 () { // OR EDX, 0x8 // OR (R32.EDX, 0x8) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (R32.EDX, 0x8); asm.Encode (memoryStream); byte [] target = new byte [] { 0x83, 0xca, 0x8 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR EDX, 0x8' failed."); }
public void OR_mem16_imm16 () { // OR Word [CS:0x12345678], 0xe6a // OR (new WordMemory(Seg.CS, null, null, 0, 0x12345678), 0xe6a) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new WordMemory (Seg.CS, null, null, 0, 0x12345678), 0xe6a); asm.Encode (memoryStream); byte [] target = new byte [] { 0x2e, 0x66, 0x81, 0xd, 0x78, 0x56, 0x34, 0x12, 0x6a, 0xe }; Assert.IsTrue (CompareData (memoryStream, target), "'OR Word [CS:0x12345678], 0xe6a' failed."); }
public void OR_mem8_reg8 () { // OR [ES:ESI + EDX*1], CL // OR (new ByteMemory(Seg.ES, R32.ESI, R32.EDX, 0), R8.CL) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new ByteMemory (Seg.ES, R32.ESI, R32.EDX, 0), R8.CL); asm.Encode (memoryStream); byte [] target = new byte [] { 0x26, 0x8, 0xc, 0x16 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR [ES:ESI + EDX*1], CL' failed."); }
public void OR_mem16_imm8 () { // OR Word [EBX + EDI*2], 0x5 // OR (new WordMemory(null, R32.EBX, R32.EDI, 1), 0x5) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new WordMemory (null, R32.EBX, R32.EDI, 1), 0x5); asm.Encode (memoryStream); byte [] target = new byte [] { 0x66, 0x83, 0xc, 0x7b, 0x5 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR Word [EBX + EDI*2], 0x5' failed."); }
public void OR_mem32_imm8 () { // OR DWord [EBP*1 + 0x12345678], 0x9 // OR (new DWordMemory(null, null, R32.EBP, 0, 0x12345678), 0x9) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.OR (new DWordMemory (null, null, R32.EBP, 0, 0x12345678), 0x9); asm.Encode (memoryStream); byte [] target = new byte [] { 0x83, 0x8d, 0x78, 0x56, 0x34, 0x12, 0x9 }; Assert.IsTrue (CompareData (memoryStream, target), "'OR DWord [EBP*1 + 0x12345678], 0x9' failed."); }