title: x86 Assembly: error A2008: syntax error : neg
body: <p>My program executes without the following line:</p>
  <pre><code>neg eax
  </code></pre>
  <p>For some reason, when I add that line, my solution fails to build and the following error occurs.</p>
  <pre><code>error A2008: syntax error : neg
  </code></pre>
  <p>I'm using MASM in Visual Studio.</p>
  <p>Does anyone have any idea why this may be happening?</p>
  <p>Here is the code example from the book:</p>
  <pre><code>.386
  .model flat,stdcall
  .stack 4096
  ExitProcess proto,dwExitCode:dword
  
  .data
      Rval SDWORD ?
      Xval SDWORD 26
      Yval SDWORD 30
      Zval SDWORD 40
  
  .code
  main PROC
      ; INC and DEC
      mov ax,1000h
      inc ax ; 1001h
      dec ax ; 1000h
  
      ; Expression: Rval = -Xval + (Yval - Zval)
      mov eax,Xval
      neg eax ; -26
      mov ebx,Yval
      sub ebx,Zval ; -10
      add eax,ebx
      mov Rval,eax ; -36
  
      INVOKE ExitProcess,0
  main ENDP
  END main
  </code></pre>