Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is MASM crashing on assembly?
    text
    copied!<p>I'm working on a project for class, and the professor wants us to use MASM instead of any other assembler. (I know thats is stupid, talk to him not me.) When I run ML.exe to compile my code, it crashes. Not the program I'm writing, but the assembler itself. What could possibly cause that? It's running for a really long time before it goes, so maybe it's an infinite loop of some sort.</p> <p>Here's my code:</p> <pre><code>.386 .MODEL FLAT PUBLIC compute_b_proc points EQU [ebp + 16] bs EQU [ebp + 12] n EQU [ebp + 10] m EQU [ebp + 8] .CODE compute_b_proc PROC NEAR32 push ebpi mov ebp, esp mov ax, n cmp ax, m je base_case mov ax, m inc ax pushd points push n push m call compute_b_proc push eax fld DWORD PTR [esp + 8] pop eax mov ax, n dec ax pushd points push n push m call compute_b_proc push eax fld DWORD PTR [esp + 4] pop eax fsubp lea eax, points mov ebx, n shr ebx, 3 add eax, ebx fild REAL4 PTR [eax + 4] lea eax, points mov ebx, m shr ebx, 3 add ebx, 4 add eax, ebx fild REAL4 PTR [eax] fsubp fdivp pushd 0 fstp DWORD PTR [eax + 4] pop eax mov esp, ebp pop ebp ret 12 lea eax, points mov ebx, n shl ebx, 3 add eax, ebx mov eax, DWORD PTR[eax] mov esp, ebp pop ebp ret 12 compute_b_proc ENDP END </code></pre> <p>MASM compiles other files fine. The error message is just "ML.exe has stopped working," nothing else. I should note that I'm using MASM version 6.11. It's what the professor provided.</p> <p>It seems to be the floating point instructions that make it crash. I reinstalled MASM, but it's still crashing on everything floating point.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload