Professional Documents
Culture Documents
Inter Clas Are
Inter Clas Are
int main()
{
int a[8] = { 1, 3, 5, 6, 7, 11, 12, 13}, b[4] = { 2, 8, 9, 10 }, na = 8, nb =
4, c[12];
_asm
{
mov esi, 0 // i = 0
mov edi, 0 // j = 0
lea eax, a
lea ebx, b
lea ecx, c
startwhile:
cmp esi, na // i < na
jae endwhile
adaugaj:
mov edx, [eax]
mov[ecx], edx
add eax, 4
add ecx, 4
inc esi
jmp startwhile
endwhile:
startfor1:
cmp esi, na
jae startfor2
startfor2:
cmp edi, nb
jae endall
endall:
}
for (int i = 0; i < na + nb; i++)
cout << c[i] << " ";
cin >> na;
}