Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4. static int m[20];
  5. int ex2(int n){
  6. __asm{
  7. mov eax, 0
  8. mov eax, n
  9. mov ecx, 0
  10. for:
  11. mov [m + 4 * ecx], eax
  12. add eax, n
  13. inc ecx
  14. cmp ecx, 20
  15. jl for
  16. }
  17.  
  18. }
  19.  
  20. int main(){
  21. ex2(5);
  22. for (int i = 0; i < 20; i++){
  23. cout << m[i] << " ";
  24. }
  25. cout << endl;
  26. system("pause");
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement