Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int n = 0;
- int suma = 2;
- cout << "Podaj n : ";
- cin >> n;
- int* wektor = new int[n];
- for (int i = 0; i < n; i++) {
- cout << "Podaj " << i << " element wektora ";
- cin >> wektor[i];
- }
- __asm {
- mov ecx, n;
- mov ebx, wektor;
- xor eax, eax;
- petla: mov edx, [ebx + 4 * ecx - 4]
- imul edx, edx;
- mov [ebx + 4 * ecx - 4],edx
- dec ecx;
- jnz petla;
- }
- for (int i = 0; i < n; i++) {
- cout << wektor[i] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement