Advertisement
Neveles

Untitled

Dec 13th, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. float floatNumber;
  6.  
  7. void foo(int& num)
  8. {
  9.     int x;
  10.  
  11.     _asm
  12.     {
  13.         finit fld a
  14.         fld b
  15.         fstcw dd
  16.         fldcw dd
  17.         sub dd, 32
  18.         fdiv
  19.         fstp dd
  20.     }
  21. }
  22.  
  23. int main()
  24. {
  25.     float x, y, z;
  26.     cin >> x >> y >> z;
  27.  
  28.     _asm
  29.     {
  30.         finit
  31.         fld x
  32.         fld y
  33.         fadd
  34.         fld z
  35.         fadd
  36.         fstp z
  37.     }
  38.  
  39.     cout << "Summ: " << z << endl;
  40.     int divider = 0;
  41.     foo(divider);
  42.     cout << floatNumber;
  43.     return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement