我需要有关Assembly中代码的帮助.
我正在接受这个问题,我的小组只是做了这个汇编代码,它应该和我在#c中所做的一样.
有人可以帮我理解至少在第一步中使用堆栈会发生什么,所以我可以继续并完成剩下的工作吗?
我是Assembly中的一个初学者,但我知道这些行只保存调用函数的值,为被调用函数设置一个框架并为局部变量节省空间,但我无法弄清楚接下来的第一步.
mov ebp
mov ebp,esp
sub esp, 16
Run Code Online (Sandbox Code Playgroud)
这是我在#c中所做的:
void mult_integer(int X[A_Linhas][A_Colunas], int number)
{
int c, l;
for (l = 0; l < A_Linhas; l++)
{
for (c = 0; c < A_Colunas; c++)
{
X[l][c] = number * X[l][c];
}
}
}
Run Code Online (Sandbox Code Playgroud)
以下是Assembly中的代码:
mul_integer:
push ebp
mov ebp, esp
sub esp, 16
mov dword [ebp-4H], 0
jmp L_020
L_017: mov dword [ebp-8H], 0
jmp L_019
L_018: mov edx, dword [ebp-4H]
mov eax, edx
add eax, …Run Code Online (Sandbox Code Playgroud)