Advertisement
YauhenMardan

UP_asm_1.1

May 20th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. WORD a, b;
  9. cout << "Type a" << endl;
  10. cin >> a;
  11. cout << "Type b" << endl;
  12. cin >> b;
  13. _asm{
  14. mov ax,a
  15. mov bx,b
  16. mov a,bx
  17. mov b,ax
  18. }
  19. cout << "a = " << a << endl;
  20. cout << "b = " << b << endl;
  21. system("pause");
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement