public void FDIV_mem64 () { // FDIV QWord [ESI*1 + 0x12345678] // FDIV (new QWordMemory(null, null, R32.ESI, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.FDIV (new QWordMemory (null, null, R32.ESI, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0xdc, 0xb6, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'FDIV QWord [ESI*1 + 0x12345678]' failed."); }
public void FDIV_fpureg () { // FDIV ST1 // FDIV (FP.ST1) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.FDIV (FP.ST1); asm.Encode (memoryStream); byte [] target = new byte [] { 0xd8, 0xf1 }; Assert.IsTrue (CompareData (memoryStream, target), "'FDIV ST1' failed."); }
public void FDIV_mem32 () { // FDIV DWord [DS:0x12345678] // FDIV (new DWordMemory(Seg.DS, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.FDIV (new DWordMemory (Seg.DS, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x3e, 0xd8, 0x35, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'FDIV DWord [DS:0x12345678]' failed."); }