public void FSUBR_mem64 () { // FSUBR QWord [SS:0x12345678] // FSUBR (new QWordMemory(Seg.SS, null, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.FSUBR (new QWordMemory (Seg.SS, null, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x36, 0xdc, 0x2d, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'FSUBR QWord [SS:0x12345678]' failed."); }
public void FSUBR_fpureg () { // FSUBR ST0 // FSUBR (FP.ST0) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.FSUBR (FP.ST0); asm.Encode (memoryStream); byte [] target = new byte [] { 0xd8, 0xe8 }; Assert.IsTrue (CompareData (memoryStream, target), "'FSUBR ST0' failed."); }
public void FSUBR_mem32 () { // FSUBR DWord [FS:EAX + 0x12345678] // FSUBR (new DWordMemory(Seg.FS, R32.EAX, null, 0, 0x12345678)) MemoryStream memoryStream = new MemoryStream (); Assembly asm = new Assembly (); asm.FSUBR (new DWordMemory (Seg.FS, R32.EAX, null, 0, 0x12345678)); asm.Encode (memoryStream); byte [] target = new byte [] { 0x64, 0xd8, 0xa8, 0x78, 0x56, 0x34, 0x12 }; Assert.IsTrue (CompareData (memoryStream, target), "'FSUBR DWord [FS:EAX + 0x12345678]' failed."); }