title: Why does NASM say "error: comma or end of line expected"?
body: <p>I would like to have a scalar multiplication of two vectors using NASM and C. With the convention that I only declare function in C and implementation is in assembly. I have aproblem with that program, especially in assembly file. I don't know what I am doing wrong. I have some syntax errors but I don't know why they are in 27, 28 and 37 line of my code.
  Those are errors displayed after first line of compilation <code>nasm -felf32 pos.asm -o pos.o</code>:</p>
  
  <pre><code>pos.asm:27: error: comma or end of line expected
  pos.asm:28: error: expression syntax error 
  pos.asm:37: error: expression syntax error 
  </code></pre>
  
  <p>assembly code:</p>
  
  <pre><code>; nasm -felf32 pos.asm -o pos.o
  ; gcc -m32 -o zadanie1c.o -c zadanie1.c 
  ; gcc -m32 zadanie1c.o zadanie1a.o -o zadanie1
  
   %define n qword [ebp+8]
   %define zero qword [ebp+12]
   %define vect1 qword [ebp+20]
   %define vect2 qword [ebp+20+n*8]
   %define result qword [ebp+20+n*16]
  
   segment .data
   MinusFour dw -4
  
   segment .text
   global scalar
   scalar:
  
   push ebp
   mov ebp, esp
   push ebx                 ; 
  
  fld zero ; for safety initialization
  mov ecx,n
  
  myLoop:
  
     fld vect1+ecx*8 ; v1
     fld vect2+ecx*8 ; v2
     fmulp st1 ; v1*v2
     faddp st1 ; v1*v2 + 
     cmp 0,ecx
     je end
     dec ecx
     jmp myLoop
  
  end:
   mov ebx, result
   fstp qword [ebx]
  
   mov eax, ebx
   pop ebx
   mov esp, ebp
   pop ebp
  
   ret
  </code></pre>