title: Invalid operand size for instruction
body: <p>So I'm trying to finish up my averaging program with float numbers, but I'm getting an invalid operand size. I don't understand what I'm doing wrong.</p>
  
  <pre><code>.386    
  .model flat 
  public _Average     
  .code   
  
  _Average proc
   finit
   mov ecx, [esp + 4]      
   mov ebx, [esp + 8]     
   fldz
   jecxz   Done
  
  Do:
   fadd    REAL8 PTR [ebx]
   add     ebx, 8
   loop    Do
   fidiv   REAL8 PTR [esp + 4]
  
  Done:
  ret
  _Average endp
  
  .data   
   end
  </code></pre>