[問題] 求GCD?
以下是我寫的程式:
INCLUDE Irvine32.inc
.data
x SDWORD ?
y SDWORD ?
n SDWORD ?
.code
main PROC
call ReadInt
cdq
xor eax, edx
sub eax, edx
mov x,eax
call ReadInt
cdq
xor eax, edx
sub eax, edx
mov y, eax
while:
cmp y, 0
jz endwhile
mov eax, x
cdq
mov ebx, y
idiv ebx
mov n, edx
mov x, y
mov y, n
endwhile:
mov eax, x
call WriteInt
exit
main ENDP
END main
可是會出現:
1>Assembling...
1>MASM : warning A4018: invalid command-line option : /errorReport:prompt
1>MASM : fatal error A1017: missing source filename
1>Project : error PRJ0019: 工具傳回錯誤碼"Assembling..."
1>已將建置記錄儲存於 "file://c:\Documents and Settings\123\My
Documents\Visual Studio 2005\Projects\masm\masm\Debug\BuildLog.htm"
1>masm - 2 個錯誤,1 個警告
========== 建置: 0 成功、1 失敗、0 最新、0 略過 ==========
為甚麼呢...程式本身應該沒錯吧?請大家解答~謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.137.104.248
→
12/16 21:30, , 1F
12/16 21:30, 1F
推
12/27 06:37, , 2F
12/27 06:37, 2F
推
01/14 00:35, , 3F
01/14 00:35, 3F
推
01/18 18:30, , 4F
01/18 18:30, 4F
→
01/18 18:33, , 5F
01/18 18:33, 5F
→
01/18 18:36, , 6F
01/18 18:36, 6F
→
01/18 18:36, , 7F
01/18 18:36, 7F
→
01/18 18:37, , 8F
01/18 18:37, 8F
→
01/18 18:37, , 9F
01/18 18:37, 9F
→
01/18 18:37, , 10F
01/18 18:37, 10F
推
01/18 18:41, , 11F
01/18 18:41, 11F
→
01/18 18:54, , 12F
01/18 18:54, 12F
→
01/27 12:31, , 13F
01/27 12:31, 13F
ASM 近期熱門文章
PTT數位生活區 即時熱門文章