[問題] C code 翻譯 組合語言 (已解決)
問題(Question):
請將以下C code翻譯為相同效果的組合語言code。
運算部分請用inline assembly完成。
餵入的資料(Input):
5 6 30
預期的正確結果(Expected Output):
(5+6)*30=330
程式碼(Code):(請善用置底文網頁, 記得排版)
int cal(int a, int b, int c)
{
int ans;
ans = a + b;
ans *= c;
return ans;
}
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf("(%d+%d)*%d=%d\n",a,b,c,cal(a,b,c));
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.40.106.164
推
04/10 20:05, , 1F
04/10 20:05, 1F
→
04/10 20:05, , 2F
04/10 20:05, 2F
有善心人士願意認真解答一下嗎?小弟必定以某種方式報答您。
※ 編輯: morris0117 來自: 114.40.106.164 (04/10 20:41)
→
04/10 23:01, , 3F
04/10 23:01, 3F
→
04/11 03:23, , 4F
04/11 03:23, 4F
噓
04/11 06:44, , 5F
04/11 06:44, 5F
→
04/11 17:01, , 6F
04/11 17:01, 6F