Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int n = 6;
- int main() {
- int a[n], b[n], c[2 * n];
- cout << "Fill the first 'a' array:" << endl;
- for (int i = 0; i < n; i++) {
- cin >> a[i];
- }
- cout << "Fill the second 'b' array:" << endl;
- for (int i = 0; i < n; i++) {
- cin >> b[i];
- }
- _asm {
- mov esi,0
- mov ecx,n
- beg_1_:
- mov eax,a[esi]
- mov c[esi], eax
- add esi,4
- loop beg_1_
- mov edi,0
- mov ecx, n
- beg_2_:
- mov eax, b[edi]
- mov c[esi], eax
- add esi, 4
- add edi,4
- loop beg_2_
- }
- cout << "The third 'c' array:" << endl;
- for (int i = 0; i < 2*n; i++) {
- cout << c[i]<<endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement