-1
lea ecx,wtavg
push ecx
call StdOut
xor eax,eax
lea eax,wtsum ; I have values stored in these variables(integer data)
mov eax,[eax]
lea ecx,sumwts
mov ecx,[ecx]
div ebx ; The problem lies here, "Windows Stopped working"
lea edi,temp1
mov [edi],ebx
lea edi,rem
mov [edi],edx
print ustr$(eax),0,0
lea eax,pt
push eax
call StdOut
lea eax,rem
mov eax,[eax]
mov edx,100
mul edx
lea ebx,temp1
mov ebx,[ebx]
div ebx
xchg ebx,eax
print ustr$(ebx),13,10
lea eax, prompt
push eax
call StdOut
mov eax,100
push eax
lea eax,temp1
push eax
call StdIn
call ExitProcess
也許您對期望的結果和您看到的確切錯誤有更詳細的瞭解。 – ouflak 2014-12-05 08:50:12
確保:'0 <= edx
2014-12-05 11:13:10