1
我的代碼看起來像這樣x86彙編關於產品輸出
_declspec(naked) void
f(unsigned int input,unsigned int *output)
{
__asm{
push dword ptr[esp+4]
call factorial
pop ecx
mov [output], eax //copy result
ret
}
}
__declspec(naked) unsigned int
factorial(unsigned int n)
{
__asm{
push esi
mov esi, dword ptr [esp+8]
cmp esi, 1
jg RECURSE
mov eax, 1
jmp END
RECURSE:
dec esi
push esi
call factorial
pop esi
inc esi
mul esi
END:
pop esi
ret
}
}
它的階乘功能,我想輸出的答案是遞歸計算但那是在
通過數字我後返回作爲輸出是相同的大數我一直得到 不知道我的輸出有什麼問題,我也看到這個錯誤 CXX0030:錯誤:表達式無法評估
謝謝!